1

I wants to associate simple products to configurable product from while creating the configurable product using soap api in magento1.9

2 Answers 2

1

catalog_product_link.assign SOAP V1 API method helps you achieve it.

Sample Code to associate products

$client->call($sessionId, 'catalog_product_link.assign', array('configurable', $configurableProductSku, $associatedSimpleProductSku));

Go through this magento article to get a grip on it.

Edited:

The association between a child and configurable products is different from the way it does with the rest of the product types ( like cross sell, up sell, grouped )in magento. Apparently, there is no direct SOAP method to provide such association. So, this extension will achieve what you need.

5
  • Hi @nikin i tried the above code, iam getting Error: Fatal error: Uncaught SoapFault exception: [100] Given invalid link type. Jul 12, 2018 at 7:56
  • Try replacing configurable type with grouped type and check it. $client->call($sessionId, 'catalog_product_link.assign', array('grouped', $configurableProductSku, $associatedSimpleProductSku));
    – nikin
    Jul 12, 2018 at 8:12
  • But , i wants to assign simple products to configurable products Jul 12, 2018 at 9:53
  • 1
    No, just want to make sure that the system does not throw any exception when replaced with grouped type. Anyway, looks like the association between simple and configurable products is different from the way it does with the rest of the product types ( like cross sell, up sell, grouped ) in magento. Apparently, there is no direct SOAP method to provide such association. So, could you use this extension and see if it helps
    – nikin
    Jul 12, 2018 at 10:53
  • Thanks for your reply, Yes, i installed that extension, but products are assigning to config while creating simple at the same time while creating the config only. Jul 12, 2018 at 10:55
0

This extension is worked for me :

http://www.bubblecode.net/en/2012/04/20/magento-api-associate-simple-products-to-configurable-or-grouped-product/

Thanks

2
  • Glad that it worked for you. I have edited my answer to include this solution. Could you please accept my answer.
    – nikin
    Jul 12, 2018 at 14:44
  • Hi @nikin i am able to associate simple product to cofigurable while creating the product only, but iam unable to associating existing simple products to configurable product, if you have any idea please let me know Jul 16, 2018 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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