Reputation: 579
I am making API for android app using magento
website. So I am using Magento API
. In my checkout process at last i want to show order review. In order review i want to show product name, price, quantity, subtotal, shipping charges, grand total. So how can i get whole information? It would be great if solution will be in Magento API
.
Upvotes: 1
Views: 537
Reputation: 259
use following code for review order in magento using soap api:
$client = new SoapClient("http://example.com/api/soap/?wsdl");
$session = $client->login('username', 'password'); //set session
$cartInfo=array();
$quoteId = $client->call($session, 'cart.create', array('default'));// for create cart
$cartInfo['info'] = $client->call($session, 'cart.info', $quoteId); // for get all cart information
$cartInfo['total'] = $client->call($session, "cart.totals", array($quoteId)); get cart total and shipping charges
print_r($cartInfo);
Upvotes: 2