0
我已經爲Magento中的訂單位置創建了API,但問題在於,當我下訂單時,購物車不會變空,產品仍然出現在購物車中。我怎樣才能清理我的購物車?使用Magento SOAP API訂購後清空購物車
我已經爲Magento中的訂單位置創建了API,但問題在於,當我下訂單時,購物車不會變空,產品仍然出現在購物車中。我怎樣才能清理我的購物車?使用Magento SOAP API訂購後清空購物車
您需要使用shoppingCartProductRemove (SOAP V2)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
$result = $proxy->shoppingCartProductRemove($sessionId, 10, array(array(
'product_id' => '4',
'sku' => 'simple_product',
'qty' => '1',
'options' => null,
'bundle_option' => null,
'bundle_option_qty' => null,
'links' => null
)));
var_dump($result);
欲瞭解更多詳情,請參閱:Product Remove
但是,這是簡單的產品,我只配置產品還如何傳遞的所有產品在車中刪除。 – Akhil