I’m on the same problem right now. I found out, that assosicated products don’t show up if there is a required attribute missing for the simple product.
I’m stuck now with the issue having configurable attributes dublicating themselves on the configurable product for each time I run the import. Any ideas on that one?
can anyone confirm if these workarounds work in Magento version 1.1.6.
I have tried every combination of methods on this post and no luck.
I just cannot get the simple products to appear in the “Super product attributes configuration” part of the associated products for the configurable product.
I’m sure i’m following the instructions correctly but no joy.
If someone has any good ideas to try i’d love to hear them.
@danieln:
Your code seems backwards to me. If the productId exists, it’s not new.
@dp7777:
I’ve been out of town and doing other things, so I haven’t tried the import since I upgraded to 1.1.6. But I had to examine the changes made in 1.1.6 intimately because I didn’t have my stuff separate.... (oops) ... and I didn’t see anything that would change how the import works since 1.1.3 which is where I was testing before.
Sorry, I don’t know what else to tell you to try.
I’ve just managed to successfully import configurable products with the links to their associated simple products. Thanks to joyously and danieln for your code and advice, I followed your tips and it all worked brilliantly. It took some time—but it worked!
I also managed to get the products and attributes to show up on the front end (without having to manually save them or use an SQL query). The trick seems to be that you need to specify a “websites” value in your CSV file. I set it to “base” for all my products, and this solved the problem. Of course “has_options” and “required_options” both need to be set to 1 as well , but this wasn’t taking effect until I tried setting the “websites” value.
Please give it a try and let me know how you get on. I’m using version 1.1.6 BTW.
Mike, I have tried your suggestion but have had no success with it, my products still do not show their options. Would it be possible for you to send me an example of a product you imported so I can compare the csv/xml that I have used to yours. There may be a dependancy on certain columns being in the import to get this to work. I am using 1.1.6 as well.
It is vital that this is resolved otherwise I am going to have a hard time defending the development process of Magento when this is still not working after so many update releases.
Many thanks
Jason
UPDATE My template set only had option container 2 being displayed, and the option_container attribute was either not being imported or being set to container1 by default. Which is opposite to the products created in the admin console. Anyway by either updating or adding this attribute to the catalog_product_entity_varchar table I was able to get the options to display in the frontend. I still need to do some more testing to work out exactly what is happening, but this appears to be the right area to solve the problem for me.
Have attached some files to give an idea of what worked for me. I hope this can help others who have been following this topic, but might have had some bad luck with their importing somewhere along the line! I was setting up a shoe store, so just needed multiple sizes for each shoe. You may be doing something more complex of course, but perhaps this can get you going in the right direction…
CSV file: This example file only has one shoe, made up of 9 simple and 2 configurable. (The 2 config ones are pretty much identical, just with different images as this shoe has multiple pics). BTW - make sure the config prods are below the simple prods, or the linking won’t work!
Import Profile: You’ll have to set up an Advanced Profile in the Magento admin. This one worked for me.
Productwithlinks.php: This file needs to go in: /app/code/core/Mage/Catalog/Model/Convert/Adapter/Productwithlinks.php
It’s just a copy of: /app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php, but with code changes mentioned by clever people earlier in this thread.
Can’t guarantee that this will work correctly for everyone, but it solved my problem. Hope it helps!
Works a treat - great work, that has saved me much time.
@sheila - I don’t think Magento automatically creates attributes for you nowadays on imports although I am sure it did once. I used phpmyadmin to manually add those in, however, srinigie (?) has posted a script that does the job for you, the link I don’t have to hand but is out there.
@Michael Clegg - Thanks for all the hard work! Sadly, my simple products aren’t showing up in the frontend even after following the examples you attached. I edited your Import_Profile with the filename of my CSV and uploaded Productwithlinks.php into the proper directory. Running the Import brings all of my products into the Magento Admin’s Product List, they just aren’t properly associated. I wonder if the problem is that I have multiple config_attributes (your CSV only had one)?
I’ve finally got some real data to import! But when I try to run my version of the import (Productwithlinks), I get the message that it can’t find the adapter by that name.
I checked and it’s still there in the code directory.
I don’t know what happened. I was running it fine on 1.1.3, upgraded to 1.1.6, went away for awhile, now it doesn’t work. But other people have gotten it to work on 1.1.6 and I had it working before… I’m not sure what to try…
UPDATE: I couldn’t get any of the files I created as adapters to work (it would parse my data file and then say it couldn’t find the adapter specified), so I put my changes into the a local copy of the normal import adapter. It worked just fine, like in my tests. All the simples were associated to the configurables, they all show up on the front end, all the related products show up, and the up-sells show up. No problems once my adapter actually got executed. This is on 1.1.6.
So the two configurable product lines Michael has in his Product_Amber.csv file is actually one configurable product with two images, yes? Is this how you import products with multiple images?
Also, can I use this tool to import configurable products and their simple products and have more than one config_attribute? The store I’m working on has several attributes of the simple products that are used to create the configurable product, not just one. Can this be done?