cancel
Showing results for 
Search instead for 
Did you mean: 

cannot add configurable product to cart in magento with soap API

SOLVED

cannot add configurable product to cart in magento with soap API

I try this code to add configurable product to shopping cart but it`s not work.

 

$pro = array(
            'product_id' => '916',
			'sku' => 'vam_conig_test-01',
			'qty' => '1',

           'options' => array(
               0=>  array(
                'key' => 214,        //attribute id
                'value' => 252       //value
                ),
                1=> array(
                'key' => 215,
                'value' => 254
                ),
                2=> array(
                'key' => 217,
                'value' => 262
                ) 
            )
           ,'bundle_option' => null,
	     	'bundle_option_qty' => null,
	    	'links' => null
        ); 
$result_addProduct2Cart = $proxy->shoppingCartProductAdd($sessionId, $result_CartId, array($pro),'1');

 

 

but this code return me this message :

 

Uncaught SoapFault exception: [1022] Please specify the product's option(s)
My configurable product has 3 attributes,and when I add this product to cart from front page,I get these message
product:916
related_product:
super_attribute[214]:252
super_attribute[215]:254
super_attribute[217]:262
qty:1
 

 

 

 

Thanks !

 

Tags (3)
2 REPLIES

Re: cannot add configurable product to cart in magento with soap API

Follow This Link

 

http://magento.stackexchange.com/questions/8601/unable-to-add-configurable-product-to-shopping-cart-...

 

It might help you.

OpenSource Expert | OpenSource Technologies | www.opensourcetechnologies.com
Magento plugins released: http://www.opensourcetechnologies.com/product/product-category/magento-extensions

Re: cannot add configurable product to cart in magento with soap API

I had solved the problem with your help.Thanks very much.