我尝试使用此代码将产品添加到购物车:
$proxy = new SoapClient('http://example.com/index.php/api/v2_soap/?wsdl');
try{
$result = $proxy->shoppingCartProductAdd($sessionID, $cartID, array(array(
'product_id' => $productID,
'sku' => $sku,
'qty' => $qty,
'options' => null,
'bundle_option' => null,
'bundle_option_qty' => null,
'links' => null
)));
} catch(SoapFault $e){
$result = $e->getMessage();
}
我通过以下链接找到了它:Magento API
在链接示例中,如果我想在产品中添加颜色或大小等选项,或者将产品添加到购物车中,那么它会为选项传递null,我该怎么办?