1

I have created the simple and configurable products by soap v2 api. But I can't able to assign the associated products and attributes to the configurable products. I tried the below code,

$proxy = new SoapClient('http://localhost/magento/api/v2_soap/?wsdl'); 
$session = $proxy->login('******', '********'); 

$attributeSets = $proxy->catalogProductAttributeSetList($session);
$attributeSet = current($attributeSets);
    $productData = array(
                'name'=>'Configurable Product',
                'description'=>'Configurable Product',
                'short_description'=>'Configurable Product',
                'website_ids'=>array('base'),
                'categories'=>array(2),
                'status'=>1,
                'visibility'=>4,
                'tax_class_id'=>0,
                'weight'=>0,
                'stock_data'=>array(
                    'qty'=>10000,
                    'is_in_stock'=>1,
                ),
                'associated_skus' => array('V - Neck'),
                'additional_attributes' => array(
                    'single_data' => array(
                        array(
                            'key'   => 'color',
                            'value' => 5,
                        ),
                    ),
                ),
                'price'=>10,
        );
        $proxy->catalogProductCreate($session,'configurable',$attributeSet->set_id,'Configurable Product 23',$productData);
1

You'll need a 3rd party module to allow for such functionality unfortunately.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.