cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a configurable product made of simple products

SOLVED

How to create a configurable product made of simple products

Hello everyone!

I came to see you for your opinion on the best way to proceed according to the following problem:
- from a CSV I create by import in Magento simple products (multi website)
- without having to add configurable products in this CSV, I want to create configurable products each time several simple products have a common 'code' value in the csv.

 

My first (and only) was to rewrite javascript methods that we can find in _toHtml () of the Mage_Adminhtml_Block_System_Convert_Profile_Run class.
My idea was to save the needed info to create configurable products during import is running, and when all the simple products are created, just before

New 'Ajax.Request ('. $ This-> getUrl ('* / * / batchFinish', array ('id' => $ batchModel-> getId ()

is executed I create a new controller that will create the configurable products.

Except that before I go into it, I wanted to have your opinion in case it would be much simpler according to you.

Thank you.
Aurélien

7 REPLIES

Re: How to create a configurable product made of simple products

hi @Nodules

 

As per my assumption you wants to create configurable product by simple product common attribute during import. For creating configurable product you need to override the saveRow() function of ' Mage_Eav_Model_Convert_Adapter_Entity ' class. Also you can import configurable product by using magmi importer it is faster than magento profiler .

 

Let me know if it helps.

Let me know if it helps. You can raise a KUDOS if its really worth for you. Also if it solves your problem then please mark as SOLUTION.

Re: How to create a configurable product made of simple products

Thanks for your reply @htpvikas,

 

However I unfortunately don't have a saveRow() method in my 'Mage_Eav_Model_Convert_Adapter_Entity' class. 

Ive one in Mage_Catalog_Model_Convert_Adapter_Product which is already rewriten but it doesn't help my in that case.

 

I forgot to mention that I work on an old version 1.4.1.1 of Magento.

Re: How to create a configurable product made of simple products

Hi @Nodules

 

The best way to import configurable product use magmi importer. it is more faster than magento profiler for bulk import. You can try this.

 

Let me know if it help.

Let me know if it helps. You can raise a KUDOS if its really worth for you. Also if it solves your problem then please mark as SOLUTION.

Re: How to create a configurable product made of simple products

Dear @htpvikas,

 

Reading your last post I prefer to precise that I don't want to import configurable product, but import simple products and then if needed (there exists same simple products with more than one color or size), create a configurable product with these associated simple products.

 

Moreover, I would expect to not use magmi in the first time even if I know it is faster than the Magento profiler.

Re: How to create a configurable product made of simple products

Hi @Nodules

 

Please let me know some information from your side:

 

  1. When you wants to create configurable product? at time of import or latter.
  2. how you can identify the which simple product group will create configurable product? by product name or else.

 

 

 

Let me know if it helps. You can raise a KUDOS if its really worth for you. Also if it solves your problem then please mark as SOLUTION.

Re: How to create a configurable product made of simple products

@htpvikas

 

  1. I would like to create the configurable product(s) at time of import, once all the simple products have been created. That could be in the import process itself, or via an observer fired when import is finished for exemple.
  2. in my CSV I'll have a column named 'code' and if two or more product have the same code then they need a configurable product.

Re: How to create a configurable product made of simple products

Hi @Nodules

 

I have solution for your query. You can do this by 2 ways.

Way 1- By using observer

catalog_product_import_finish_before

OR

catalog_product_import_finish_after

In this observer you can find all imported items and create configurable product with same 'code' simple product and associate simple product to configurable product.

 

Way 2 - Create custom advance profile for product import and in saveRow() function you can perform same operation. Here is the link i am sharing with you for how to create custom advance profile.

https://santoshyadavcse.wordpress.com/2013/01/01/magento-create-custom-advance-profile/

 

Let me know if it helps. You can raise a KUDOS if its really worth for you.

 

Let me know if it helps. You can raise a KUDOS if its really worth for you. Also if it solves your problem then please mark as SOLUTION.