By default, Magento API does not allow to assign products to any configurable or grouped product. Here is an extension that will allow you to do so by simply specifying the simple products skus to associate when creating configurable or grouped product.

Usage

To associate simple products automatically and regardless of the API version of Magento you are using (v1, v2, v2 + WSI-Compliance), simply add a key associated_skus to product data array of configurable or grouped product to create/update.

True ^^ Well, i followed the steps for the manual installation and use the code in “product API v1″.
I made sure the SKU’s in ‘associated_skus’ matches with the ones from the singled product i added before.

The products adds correctly but the link between the Configurable product and the Simple products is not made. I don’t have any soap exception to see what happens

But I have 1 question:
I have some configurable products that are using two attributes (color and memory card).
Using your module I’ve created the product (like red+ 2GB, blue+4GB), but I’ve failed when trying to set up the correct price for each attribute value.

For example:
For the color: ‘red’ , the price increases $5.00
For the memory card ‘2GB’, $15.00.

Hello, I’m using your extension and I face the same issue. If the simple product has only one attribute, it works like a charm, but with two or more (in our case its size and color) it creates but doesnt associate. Could you please give us a feedback on this? Thanks in advance.

Hello, I’m using your extension and I face the same issue. If the simple product has only one attribute, it works and associate the simple product with configurable , but with two or more (in our case its size and color) it creates but doesnt associate. Could you please help me. Thanks in advance.

Yes, it’s not because of Magento 1.7, i made some tests back on my 1.5.1.0 and it’s working.
In fact i imported my simple products the wrong way (without the “dropdown list” type attribute set, in “global scope” and with “Use To Create Configurable Product” to yes).
So the products were associated internally but not shown because they were badly configured !

Hello my friend. Your extension saved my life, and my job too. I used with c# and WebService. I’m just having one problem: I want to insert the price changes on c#. I think could be something like this:

I think may be a problem caused by the type of price_changes inside the wsdl.xml file . I need something like a complexObjectArray. I already tried to change the configuration of to complexFilterArray but the same error is ocurring.
I just need to set the value of the price_changes inside my program in c#.
Thanks.

The configurable product and simple products are correctly created but any simple product is associated to the configurable product.
I use Magento 1.5.0.1 and also the extension “Simple configurable product”.
I really need to create configurable products via webservices ; how can I do ?

In the BDD, the fields has_options and required_options in the table catalog_product_entity are at 0 ; perhaps there’s a problem here ?
Can you help me ?

I know this is developed for CE 1.6+… What do you think the chances are that this will work in EE(1.12)? We are running into the same issue in EE where we can push the simple products but cannot not associate them to configurable products (we can associate to grouped products as mentioned)… but that’s not what we need for color/swatch selectable product displays.

I am more than happy to report (you should see the smiles) that your API extension works just fine on Enterprise Edition v1.12. Thank you so much for this piece of work. IMO you fixed a major hole in the Magento API that Magento wasn’t taking any responsibility for. Mage staff told me this issue wasn’t even in their road-map.

Only one odd behavior we can’t figure out… Products go in perfectly and appear 100% correct in admin… (visibility, in-stock, enabled, inventory, etc.) however, the item/s show as unavailable/out of stock on the front-end. All we have to do is open the Config product in Admin (do nothing) and save it. Then the item displays in stock on the front end. Any ideas?

just wanted to say that I’m investigating this right now and I’m quite positive that I’ll find a solution quite soon. By comparing the Database before and after saving in the Admin Panel, and trying out every change one by one, I found out, that the DB-Field for the configurabe Product needs to be added in catalog_product_index_price and the Stock status for the configurable also needs to be created (cataloginventory_stock_status) although I don’t manage stocks.

Now I just need to automate this somehow – maybe by updating the Plugin…

I have to create a grouped using magentoApi. And also I need to associate simple products to this grouped product. Using ‘associated_skus’ => array(‘SKU-001′, ‘SKU-002′) i am able to create grouped product with associated simple product.

Instead of this sku is it possible to use custom product attribute? for example i have an product attribute “Itemcode”. Is it possible to use this attribute to add simple product…
please guide me

Hello Johann, im Renan from Brazil. You are doing an amazing thing sharing your knowledge with us. Thank you very much!!!

I did install using github, but inside visual studio when i update the service reference the catalogProductCreateEntity doesn’t have the associated_skus property inside the webservice definition(http://myurl/magento/index.php/api/v2_soap?wsdl=1), so it isn’t possible for my code to run. Can you help me find the solution?

another doubt is about the cache you say. Is it that cache inside magento? or other cache? Can you please specify what cache is?

Hi Johann,
I am using your free extension for adding configurable products through SOAP and it is mostly working well. Thank you for writing this!

I am having a problem with setting prices for different colors. There are no errors when I run the SOAP script, but when I look at the configurable product afterwards, the price remains the same when selecting different colors. Perhaps I am not setting it correctly in the script. I am using the version from Nov 6, 2012 on enterprise 1.12.

Magento is configured to use ‘color’ as the only attribute matching simple products to configurable.

This approach successfully adds the simple and configurable products, associates them, and the color selection works correctly. But the prices of the different colors remain the same when I select different colors.

The admin panel for the configurable product, in the section “Super products attribute configuration”, color is shown as the selectable attribute but there are no price differences listed.

I must say, that is a great module and definitely a life-saver. How Magento willingly ignores such a basic requirement is beyond me. So thanks are in order.

Your module seems to work exactly as advertised but I’m curious about how it handles multi-select attributes. I have, so far not been successful in specifying multi-select options when creating a product. I’ve tried associating an array to the attribute key and I’ve even tried comma-separated values but it’s all been without success.

I am, of course, using the option labels and not the IDs because I can’t retrieve the option IDs through the standard API (another Magento miracle) and since your module seems to add the ability to use labels for options, I am assuming that the same goes for multi-select options. But I can’t make it work and I haven’t seen an example of this.

I am looking through the code as we speak to try to figure this out but any help would be appreciated and would probably benefit others as I’d hate to think that I am the only one who needs to create configurable products having multi-select attributes through the API

Ok, I had a look at the code and I noticed that the getOptionKeyByLabel function in Helper/Catalog/product.php used by api.php doesn’t handle arrays, only values. So if anyone is interested, I modified it on my copy and tested it. I can confirm that it works. Here is the modified function:

I have got this working thank you for sharing it with us. A question If I may…

I have created 3 extra attributes Colour,Size & Finish.

When I create the simple products and the configurable product I have entered a value for each attribute – e.g.

Product 1 -> Blue -> Large -> Gloss

etc, etc

This works fine the configurable product will show front end and I can make my choices via the drop downs.

My issue is now, not all configurable products I have will have a finish. They will for example have a colour & size: e.g.

Product 2 Red -> Large

The simple products will not become accosiated with the configurable product unless I specifiy a “finish” for the simple products. Am I going wrong somewhere? Can someone point me in the right direction to fix this?

I think for it is not necessary the extension of Johan. You must only copy the address of the images of the simple product and save these images to the configurable product through the official methods of the api. Then if you want you can delete them from the product simple. Generally you save directly in configurable product and saves only him.

Hello.
That did not work for me.
I use version 1.7.0.2 of Magento. So I copied the folder “app” extension to the root of magento, put the windows to merge folders. Updated the cache (but it was already disabled).
Then I copied the example “API V1″, I set my three parameters (address of the wsdl file, user api, api password) and then immediately put it to run. Not accused any errors, BUT … simple products were not associated with the configurable product!
I entered the configurable product edition and did not list any items associated with it.

What can it be? How to know the version of my API? How to know if the extension is working properly?

I’m using the Magento API to port products between 2 Magento systems and the bugbear has always been the configurable products. After installing this API, it works beautifully (although I will have to make 2 passes – all the simples first and then the configs)

The only real problem was that the API call that GETs the product details from the OLD system DOESN’T tell you the associated products!

So here’s the solution if you want to do the same thing :
Edit the file in the OLD system : \app\core\Mage\Catalog\Model\Product\Api.php (if you are going to continue to use this then put this file in ‘local’)

Find the method ‘info’. After the code that sets up the $result array and before the ‘foreach’ loop, insert this block of code :

I use the API v2. So I added your snippet to the Info method in “Catalog/Model/Product/Api/V2.php”. After removing cache from the site and updating the api service the associated_skus property is not showing.

Can you guide me in the right direction in how this is possible or what I need to do more to achieve it?

Hi, how do i disable price calculator for the dropdown bar (ie- +£4.50) i dont want a + price calculator or a % adder,seems to be one thing after another with magento,i started from scratch along side our web developer and we help each other out and have cracked a lot of it apart from this last hurdle (or is it!!!!!)Magento ver. 1.7.0.0 please help before i go doolally!!!

I noticed your example for the API v2 is using the v1 method for creating the configurable product (see the last line in the example). Is this required for your extension to work, or just a copy and paste typo?

Hello I have this problem:
There are no errors when I run the SOAP script, simple and configurable product are created and associated with correct attributes. But in product page of front-end, the drop down list aren’t present. I can’t make the choice.

If in back-end I open configurable product and save (without any changes) the dropdown list become visible on frontend.

I create simple product and configurable product, but the simple no associate with the configurable in the admin panel.
Error:
Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no ‘key’

Hi, i am new to megento api integration.
I downloaded the app folder and overwrite in root of my megento host.
Next i am reading Usage section of article.
There you have 3 different types of code.
I have following questions regarding it.
1. Where do i put that code ?
2. where can i find api_key & api_user?
3. how do i test once i done all steps you written ?
Please help.
Thanks

V2 does not work for me. I went in to the code and threw an exception with serialized data and got back the default items such as name fine. However associated_skus was not there even though i have set it in my update clause. I changed over to V1 for this operation and it worked fine.

How can i assign simple products to existing configurable product without creating new configurable product ?
In your V2 code, at the end you have
$proxy->call($sessionId, ‘product.create’, array(‘configurable’, ‘Default’, ‘SKU-TEST’, $productData));
Isn’t this for V1 ??? will it work for V2 call ????
It should be i think :
$proxy->catalogProductCreate($sessionId, ‘configurable’, ‘Default’, ‘SKU-260′, $productData);

The problem is that when I create the product and join him a few simple products and then when I try to do an update it does not associate correctly.

Example, if I create the configurable product and say that it is associated with product-1, product-2 and product-2 and then if I do an update saying that he will join the product-4, product-5 and product -6 it removes all associations and keeps only the product-4.

I have exactly the same issue, I have an exising configurable with say 2 simples sizes Small and Medium. I then add a new simple size Large and update the configurable with the sku’s for all 3, but the Configurable association only shows the Large, if I run it again and update the Configurable with all 3 sku’s again it then flips them back to just showing Small and Medium. I am using Magento 1.8.1.0 and Soap V2.
I can get round it by deleting all the simples and re-creating all 3 then it’s fine and subsequent updates are fine, but this is slow.
I would be grateful if any one can help.

I’ve been using your API extension for about a year now and I’ve been very happy with it.

Today I received an error from one of my customers. He tried to create a configurable product with a couple of simple products associated with it. The product property was size of shoes and he tried to create 44, 46, 48 as sizes, but the values 044, 046, 048 was already created in the product properties for size, so insted of 48 as size, the simple product was created as 048.

I looked through your code and found the method getOptionKeyByLabel in Product.php. You compare the labels using this code:

A quick question though – does this work for updating a product as well as creating?

For example, if I create a configurable product with 4 associated simple products, if I want to create and associate a new simple product to this configurable product, can I do an update on the original configurable product to associate the new simple product?

For anybody is wondering, I’ve worked out that it does work for updates as we as product creation.

However, if you try to add a simple product to an existing configurable product that already has simple products assigned, the associations to the original simple products get replaced by the new product(s).

This seems to be caused by the Bubble_Api_Helper_Catalog_Product::associateProducts method (app/code/community/Bubble/Api/Helper/Catalog/Product.php) which gets the IDs for all associated_skus and then removes the IDs of any products that are already associated.

I have commented out lines 21-26 and set $usedProductIds = $newProductIds and it now works as I would expect it to.

Seems like the wsi.xml file was not interpreted correctly by the soap server. The wsdl-file to parse with C# was generated properly, but somewhere somehow the soap server drops some fields when parsing the request.

I added the new fields in the magento core wsi.xml-file and cleanded the cache.

I know that this is not the nicest solution, but it works for me. If someone had the same problem, i would like to hear from you.

To contact me personaly simply contact our company (click on my Name, go to the contact form, and name my name).

Thanks for this extension – exactly what I was looking for and it’s amazing that magento haven’t included this already. I’ve got it working on Magento 1.8.
A couple of things that caught me out:
1. It wouldn’t work to start with because my application was caching the wsdl – so I had to set it to not cache (basic error).
2. The configurable_attributes only takes attribute ids not codes.
3. Don’t forget to check the /var/log/syslog.log for any obvious problems. File permissions were causing me some problems to start with.

Hi , current I am not able to get the configurable product associated product info in soap V2 response of api catalogProductInfo . It just returns basic attributes , how can i retrieve this is response of catalogProductInfo .
Can this extension help ?
Please note I am using Java for soap implementation

Hi Johann, first a big thank you for this extension… working fine on magento 1.9 except one thing:
I am not able to set the price changes… tried with internal (numeric) id, label, internal name… no changes are applied to the super attribute settings… so here is my piece of code (Using embarcadero delphi with soap API V2):

Having found it was not possible to link simple & configurable products with Magento I then found this site and have had the web company add the plugin. I can now see the additional options when I look at the WSDL with SOAP UI. However, I am unable to get it to work.

I do not do PHP so the only way I can work is by first testing with SOAP UI then creating that XML with my language. The SOAP UI input for the configurable product is shown below:

I have installed the extension in my demo server.But I can just see a Bubble Api section in my System – > Configuration section of mu back end.Where can I find the options to Associate simple products to configurable.Please advice.

Has anyone had an issue where they are sending 10 or more products to be assigned to a configurable and only 5 get assigned, then when doing an update it assigns the other 5 but unassigns the previous 5.

I’m just having some problems using the V1 API when trying to run product.update on the price_changes. It gives a positive response but the prices don’t change on the system for the configurable product on the color and size attributes.

Note that the other updates in the dataset DO apply, so it is definitely finding the sku.

Friends, i am having a problem:
Fatal error: Class ‘Bubble_Api_Helper_Data’ not found in /home/soporemail/public_html/app/Mage.php on line 547
Someone knows what is wrong? Magento is one 1.9. Thanks!!!

Hello , I tried you solution and it worked well to add configurable products with associated skus using soap api . Thanks .
Now if am reading this configurable products using soap api how can i get the associated simple products . Please suggest .

I´m using Magento 1.9. I run the SOAP-script without errors, but the product is shown out of stock on the front-end and when I check the products in the backend I get this message
“Only attributes with scope “Global”, input type “Dropdown” and Use To Create Configurable Product “Yes” are available.
This attribute set does not have attributes which we can use for configurable product”

I tried creating a custom Attribute Set, but it does not work either. Any tips?
Thanks

I’m using magento 1.8.1, when I open a configurable product show me this error:
An error occured while rewriting “bubble_stockmovements/adminhtml_stock_movement_grid” : “The original class “Mage_Bubble_Stockmovements_Block_Adminhtml_Stock_Movement_Grid” does not exist” (rewriter: “eval”)

Some products use all three configurable attributes but many products do not. For example: t-shirts use the color & size attributes but do not use the option attribute.

The issue that I am experiencing is that when a configurable product that does not use all three of the configurable attributes is created via the extended API the configurable product does not associate with its simple products. The reason it is not associating is because the configurable product is being created with all three configurable attributes associated with it but the simple products only has the two: size & color.

Hi,
This works great. I am able to add size and color with no problems. I just have one question how would i go by adding images to each child product as well as the parent. Also, if it can be done by putting and external link to an image.

Hi,
This works great. I am able to add size and color with no problems. I just have one question how would i go by adding pictures to each child product as well as the parent. Also, if it can be done by putting and external link to an picture.

Hello, obviously you write this function solves the many problems, to help a lot of people, I use is the version of the magento1.9.2, V1 soap test is perfect, but soap V2 error fatal:(Fatal error: Uncaught SoapFault exception: [Client] Function (“call”) is not a valid method for this service), I for this not familiar with, have been debug a week. Can you help me? And look forward to your reply. Thank you.

So I am using this in conjuction with Apparel Magic, but for some reason I can’t seem to make a simple product. I am not even sure what this is used for, Apparel Magic simply says it is required. Anyone else having this issue. I need to be able to just create a simple product when I sync my product from Apparel Magic to my Magento Store.

I’m having trouble getting this up and running. Can someone please expand on the manual installation instructions. I uploaded the magento-improve-api-master.zip file to the magento root folder (public_html in my installation) then used shell access to unzip so I now have a folder named magento-improve-api-master sitting in the magento root folder. Next I cleared the cache by wiping the contents of the var/cache folder. Is there anything else that needs to be done? Permissions to change, etc…?

Hi I am uing your extension for assigning simple products to configurable product. I am getting error as follows, I am using 1.9.2.2. This code working fine for 1.9.2.4. I guess its version issue. Can you please help me.

I am using this script as a C# project. Alle works great with the associated_skus. I use a string[] for the associated products. This works fine. But how do i create a object for the price_changes. Can anyone help please?

Hi Johann , Thanks for sharing, i also checked this on Github, but could not find the solution, you really helped me out with this issue, but i wanted to have something more precisely explained, check this post: https://www.cloudways.com/blog/magento-configurable-product/ , Here i found more about even single attribute.

Hi Johann, what a great module, wich I was searchinf for years für my customers, because we connect our ERP to Magento via SOAP API an missed this for a Long time. We established the additional call in our API to to upload master-slave-products to to shop.
Now, I installed the 1.9 again, but I get an error when clicking on your bubble Extension in the shop-configuration. There is a Page not found error in the right Windows. Magento runs on nginx.