2014-09-19 97 views
1

我使用magento网站制作android应用程序的API。所以我使用Magento API。在我的结帐过程中,我最后想要显示订单审查。为了审查我想显示产品名称,价格,数量,小计,运费,总计。那么我如何获得整个信息?如果解决方案将在Magento API中,这将是非常好的。如何获得magento订单审查信息

+0

都希望早于订单的地方后才能到位雅展现呢? – 2014-09-19 07:26:16

+0

我想在订购地点之前显示。 – 2014-09-19 07:28:14

回答

2

使用以下使用SOAP API审查才能在Magento代码:

$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);