Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

csv import of configurable products in 1.7.0.2
 
nedict
Jr. Member
 
Total Posts:  1
Joined:  2011-11-23
 

When I add a configurable product in the Admin Panel, it all works as desired/expected.
When I export the configurable product (and so it’s associated simple products), then delete the configurable product and finally import the exported file (without modifications) again, the simple products are no longer associated with the configurable product.

I use the standard export and import profiles. System -> Import/Export -> Dataflow - Profiles -> Export All Products and Import All Products.

After some searching, I added the columns “associated” and “config_attributes” at the end of the csv file. In the associated column I put all the sku’s of the simple products, and in the config_attributes column I put the desired attribute (size in my case). The configurable product is the last imported row. See my code below.

Still, the simple products are not associated with the configurable product. What am I missing?

Thanks in advance!

"store","websites","attribute_set","type","category_ids","sku","has_options","name","meta_title","meta_description","image","small_image","thumbnail","url_key","url_path","custom_design","page_layout","options_container","country_of_manufacture","msrp_enabled","msrp_display_actual_price_type","gift_message_available","price","special_price","weight","msrp","status","is_recurring","visibility","enable_googlecheckout","tax_class_id","description","short_description","meta_keyword","custom_layout_update","special_from_date","special_to_date","news_from_date","news_to_date","custom_design_from","custom_design_to","qty","min_qty","use_config_min_qty","is_qty_decimal","backorders","use_config_backorders","min_sale_qty","use_config_min_sale_qty","max_sale_qty","use_config_max_sale_qty","is_in_stock","low_stock_date","notify_stock_qty","use_config_notify_stock_qty","manage_stock","use_config_manage_stock","stock_status_changed_auto","use_config_qty_increments","qty_increments","use_config_enable_qty_inc","enable_qty_increments","is_decimal_divided","stock_status_changed_automatically","use_config_enable_qty_increments","product_name","store_id","product_type_id","product_status_changed","product_changed_websites","size","color","recurring_profile","associated","config_attributes"
"admin"
,"base","Default","simple","","12345679-26/L30","0","TestJeans2-26/L30","","","","","","testjeans2-26-l30","testjeans2-26-l30.html","","No layout updates","Block after Info Column"," ","Use config","Use config","No","12.5600","","0.0000","","Enabled","No","Catalog, Search","Yes","Taxable Goods","TestJeans2","Testjeans2 kort","","","","","","","","","12.0000","0.0000","1","0","0","1","1.0000","1","0.0000","1","1","","","1","0","1","0","1","0.0000","1","0","0","0","1","TestJeans2-26/L30","0","simple","","","26/L30","","","",""
"admin"
,"base","Default","simple","","12345679-26/L32","0","TestJeans2-26/L32","","","","","","testjeans2-26-l32","testjeans2-26-l32.html","","No layout updates","Block after Info Column"," ","Use config","Use config","No","12.5600","","0.0000","","Enabled","No","Catalog, Search","Yes","Taxable Goods","TestJeans2","Testjeans2 kort","","","","","","","","","12.0000","0.0000","1","0","0","1","1.0000","1","0.0000","1","1","","","1","0","1","0","1","0.0000","1","0","0","0","1","TestJeans2-26/L32","0","simple","","","26/L32","","","",""
"admin"
,"base","Default","simple","","12345679-26/L34","0","TestJeans2-26/L34","","","","","","testjeans2-26-l34","testjeans2-26-l34.html","","No layout updates","Block after Info Column"," ","Use config","Use config","No","12.5600","","0.0000","","Enabled","No","Catalog, Search","Yes","Taxable Goods","TestJeans2","Testjeans2 kort","","","","","","","","","12.0000","0.0000","1","0","0","1","1.0000","1","0.0000","1","1","","","1","0","1","0","1","0.0000","1","0","0","0","1","TestJeans2-26/L34","0","simple","","","26/L34","","","",""
"admin"
,"base","Default","configurable","2,3,6","12345679","1","TestJeans2","","","","","","testjeans2","testjeans2.html","","No layout updates","Block after Info Column"," ","Use config","Use config","No","12.5600","","","","Enabled","","Catalog, Search","Yes","Taxable Goods","TestJeans2","Testjeans2 kort","","","","","","","","","0.0000","0.0000","1","0","0","1","1.0000","1","0.0000","1","1","","","1","0","1","0","1","0.0000","1","0","0","0","1","TestJeans2","0","configurable","","","","","","12345679-26/L30,12345679-26/L32,12345679-26/L34","size"

PS. The file is only 5 lines, the above code-tags do break the lines.

 
Magento Community Magento Community
Magento Community
Magento Community
 
coscientiam
Jr. Member
 
Total Posts:  26
Joined:  2013-09-24
 

Hello

As far as I know there is no way you can import configurable products with having them linked to the associated simple products on fly.
There are probably some profile snippets and code snippets available over internet that make it possible, however out of box this feature is not available.

You can try this extension which handles this task though. It allows to import configurable products and generate all needed simple associated products on fly, and makes them linked. Here is the sample CSV showing the proper columns format for configurable products. The important columns are:
type | configurable_attributes | super_attribute_pricing
configurable | size,color | size::L:12;XL:15,color::red:10;green:15

The valid_configurable_combinations column is optional. This way you can restrict the combination, otherwise it will generate all possible combinations of your configurable attributes values.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kazko
Jr. Member
 
Total Posts:  1
Joined:  2013-03-14
 

use magmi, it does the job perfectly

 
Magento Community Magento Community
Magento Community
Magento Community
 
MLX_STORE
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2013-07-29
Viet Nam
 

Hi,
Please try use our extension at http://www.magentocommerce.com/magento-connect/export-import-bulk-product.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
Catostrof
Jr. Member
 
Total Posts:  1
Joined:  2013-03-05
 

Hi,

Have you made sure that attribute size has following settings:

Scope=Global
Catalog Input Type for Store Owner = Dropdown
Apply To * = All products
Use To Create Configurable Product = Yes

 
Magento Community Magento Community
Magento Community
Magento Community
 
deenfirdoush
Jr. Member
 
Total Posts:  3
Joined:  2013-09-12
 

I am successfull in creating cofigurable products with two variations such as color & size
Steps

1) created four simple products say,
iphone 8 gb, with size is 8gb,color is white
iphone 8 gb, with size is 8gb,color is black
iphone 16 gb, with size is 16gb,color is white
iphone 16 gb, with size is 16gb,color is black

2) then i created one configurable product with above four products\\\’ sku included associated key
3) i included all 8 variations in the following attributes,
_super_products_sku,_super_attribute_code,_super_attribute_option

I have attached what i created, please use the attachement

Before using sample csv, Please make sure that you have already created following global configurable attribute
with following values

Attribute code - size
values - 8GB,16GB
Catalog Input Type for Store Owner - Drop down

Attribute code - color
values - White, Black
Catalog Input Type for Store Owner - Dropdown

Also, dont forget to add appropriate category value in “_category” field. I created “Electronics” category using magange categories section before creating CSV.

In “_root_category” field, provide your root catalog name, in my sample, i renamed dafault root category into “Jgs main catalog” before creating csv, and put that name in “_root_category” field. Attached sample explains, how to create grouped product, configurable product witn single variation with price change, simple product, configurable product with multiple variations with fixed price value

Image Attachments
config-sample.png
File Attachments
custom-products-master.zip  (File Size: 2KB - Downloads: 164)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Martinly
Sr. Member
 
Total Posts:  90
Joined:  2013-11-10
 

You can view this tutorial which gives step-by-step guide How to Magento import configurable products from CSV

 
Magento Community Magento Community
Magento Community
Magento Community
 
iLook2
Jr. Member
 
Total Posts:  3
Joined:  2014-03-17
 

For the last two days I have looked into issue with importing configurable products linked to simple products using the ‘direct import’ functionality of Magento (v1.8.1) as well as the ‘data flow’. I have written code to format the input .csv file in different formats and layouts and my conclusion is the following:

Option 1 - Direct import functionality
- It does work, but the file requirements are very strict and it behaves unpredictably (example is that a clean export and import without any modifications does not even work, let alone your created files).
- It is quite slow
- When successfully importing configurable products including their link, there is still the issue that new options and categories need to be created manually in Magento before the import, which takes a lot of time in case of thousands of options

Option 2 - Data flow functionality
- It works fine and the file restrictions are a lot less, I was able to import products quite quickly, both configurable and simple products
- It is possible to define your own delimiters making it is easy to import data
- It is not possible however to link configurable products to simple products (the exported example file does not even include the fields to do so, although there may be an option in the background somewhere).
- It is not possible to create new categories or options and the import does not give you a warning for this either, so after upload you will find out that the link to the option is not there (how can it be, the option is not created, so does not exist)

Option 3 - Use custom scripts in .php or .sql
- This does work, but requires a lot of technical skills and there is a risk of messing up your database

Option 4 - Use a plugin
- My problem was resolved quicly using the plugin ‘Fast Product Import’ of Ecommerce team
- I have tried one of my existing files giving me importing issues for a day with the standard Magento import, made slight modifications based on the plugin user guide and tested it on the Ecommerce team demo site. It literally worked in 5 minutes and:

* It imports configurable and simple products plus their relation;
* It created new options if they do not exist yet;
* It creates new categories if they do not exist yet (I have not tested this thoroughly yet);
* It is much faster than the standard Magento import and basically extends the existing data flow profiles with advanced options.

My recommendation is that if you need to upload only simple products or non-related types with few options go for option 2 (not 1). If you have a large number of products and especially if you have a large number of configurable products and different attribute options definitely go for option 4. I am not saying there a no better plugins out there, but this one works quickly and fine for me.

Hopefully this saves other people from going through the same frustrating experience.

 
Magento Community Magento Community
Magento Community
Magento Community
 
TutorialMagento
Sr. Member
 
Avatar
Total Posts:  133
Joined:  2013-10-02
 

Hi, you can follow this tutorial for csv import of configurable product
2 methods to CSV import configurable products in Magento
Hope this helps

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top