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

A suggestion to import configurable products + categories
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 

Hello olliebells! You’re welcome! Je je je

I hope to continue helping, and with this small post we give form to all the solutions, as chisel model with the mallet

Well, let’s go: I think you need to locate your PHP binary, please try:

whereis php

in a shell window, another possible command was:

locate bin/php

then edit the first line in cron_import_1.3.php, when say: #!/usr/bin/php change it to the correct path (don’t erase the first two characters: #!)

if success, send me a beer

 
Magento Community Magento Community
Magento Community
Magento Community
 
Saggy
Sr. Member
 
Total Posts:  133
Joined:  2009-02-03
 
timmyludge - 28 April 2009 04:22 AM

Antonio

i hold my head in shame - i have just realised that i was trying to import using your Euro sizes and my Default is UK - so I didn’t have the Euro sizes in there…

So it does all work from the script in a browser - I just need to work out why the cronjob script in my hosting server does not work.

I will keep you updated on my progress

Thank you so much for your help

Tom

Hi Guys,

Everything is working but associated products are not working using browser. Any idea why?

Cheers
S

 
Magento Community Magento Community
Magento Community
Magento Community
 
mageuser
Jr. Member
 
Total Posts:  13
Joined:  2009-03-21
Napoli
 

Antonio,
thank you very much for your continued help on this.

I have downloaded the latest zip file and found a cron_import_1.3.php file with this single line:
../cron/cron_import_1.3.php

is this correct?
Could you please summarize all the steps needed to install and activate the script?

Many thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 

uhm I think you must obtain 2 files: the cron_import....php & Productwith......php

tomorrow I update a new version of these files (they work in same way, only minimal changes)

s2!

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 
Saggy - 05 May 2009 07:45 AM

timmyludge - 28 April 2009 04:22 AM
Antonio

i hold my head in shame - i have just realised that i was trying to import using your Euro sizes and my Default is UK - so I didn’t have the Euro sizes in there…

So it does all work from the script in a browser - I just need to work out why the cronjob script in my hosting server does not work.

I will keep you updated on my progress

Thank you so much for your help

Tom

Hi Guys,

Everything is working but associated products are not working using browser. Any idea why?

Cheers
S

can you show us a csv sample (2-3 lines with headers)

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 
mageuser - 05 May 2009 07:57 AM

Antonio,
thank you very much for your continued help on this.

I have downloaded the latest zip file and found a cron_import_1.3.php file with this single line:
../cron/cron_import_1.3.php

is this correct?
Could you please summarize all the steps needed to install and activate the script?

Many thanks.

You’re right!

There is the .zip repared. Sorry by the mistake wink

File Attachments
scripts_and_examples.zip  (File Size: 9KB - Downloads: 890)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Saggy
Sr. Member
 
Total Posts:  133
Joined:  2009-02-03
 
amartinez - 05 May 2009 08:25 AM

Saggy - 05 May 2009 07:45 AM
timmyludge - 28 April 2009 04:22 AM
Antonio

i hold my head in shame - i have just realised that i was trying to import using your Euro sizes and my Default is UK - so I didn’t have the Euro sizes in there…

So it does all work from the script in a browser - I just need to work out why the cronjob script in my hosting server does not work.

I will keep you updated on my progress

Thank you so much for your help

Tom

Hi Guys,

Everything is working but associated products are not working using browser. Any idea why?

Cheers
S

can you show us a csv sample (2-3 lines with headers)

thanks

Hi Antonio,

Thanks for your quick reply.

Please find the attached sample file. Let me know if you need anything else.

Thanks in advance.

Cheers
S

File Attachments
product.zip  (File Size: 2KB - Downloads: 418)
 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 

Hi,

The first issue I find is “Skip import row, required field “sku” not defined”.

You have SKU row, but if you see the XML Actions:

<action type="dataflow/convert_parser_csv" method="parse">
<var name="delimiter"><![CDATA[,]]></var>
<var name="enclose"><![CDATA["]]></var>
<var name="fieldnames">true</var>
<var name="store"><![CDATA[0]]></var>
<var name="number_of_records">1</var>
<var name="decimal_separator"><![CDATA[.]]></var>
<var name="adapter">catalog/convert_adapter_products.........</var>
<var name="method">parse</var>
</action>

profile use “ for enclose every row… your product.csv don’t have “ in every row!!!

please change it & try again wink

example, from:

store,websites,attribute_set,type,sku,category_ids,has_options,name,url_key,gift_message_available,meta_title,meta_description,image,small_image,thumbnail,custom_design,options_container,image_label,small_image_label,thumbnail_label,url_path,price,special_price,description,short_description,meta_keyword,custom_layout_update,special_from_date,status,visibility,tax_class_id,disable_googlecheckout,color,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_automatically,features,grouped,crosssell,upsell

"store","websites","attribute_set","type","sku","category_ids","has_options","name","url_key","gift_message_available","meta_title","meta_description","image","small_image","thumbnail","custom_design","options_container","image_label","small_image_label","thumbnail_label","url_path","price","special_price","description","short_description","meta_keyword","custom_layout_update","special_from_date","status","visibility","tax_class_id","disable_googlecheckout","color","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_automatically","features","grouped","crosssell","upsell"

s2,

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 

Hi,

The first issue I find is “Skip import row, required field “sku” not defined”.

You have SKU row, but if you see the XML Actions:

<action type="dataflow/convert_parser_csv" method="parse">
<var name="delimiter"><![CDATA[,]]></var>
<var name="enclose"><![CDATA["]]></var>
<var name="fieldnames">true</var>
<var name="store"><![CDATA[0]]></var>
<var name="number_of_records">1</var>
<var name="decimal_separator"><![CDATA[.]]></var>
<var name="adapter">catalog/convert_adapter_products.........</var>
<var name="method">parse</var>
</action>

profile use “ for enclose every row… your product.csv don’t have “ in every row!!!

please change it & try again wink

example, from:

store,websites,attribute_set,type,sku,category_ids,has_options,name,url_key,gift_message_available,meta_title,meta_description,image,small_image,thumbnail,custom_design,options_container,image_label,small_image_label,thumbnail_label,url_path,price,special_price,description,short_description,meta_keyword,custom_layout_update,special_from_date,status,visibility,tax_class_id,disable_googlecheckout,color,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_automatically,features,grouped,crosssell,upsell

to:

"store","websites","attribute_set","type","sku","category_ids","has_options","name","url_key","gift_message_available","meta_title","meta_description","image","small_image","thumbnail","custom_design","options_container","image_label","small_image_label","thumbnail_label","url_path","price","special_price","description","short_description","meta_keyword","custom_layout_update","special_from_date","status","visibility","tax_class_id","disable_googlecheckout","color","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_automatically","features","grouped","crosssell","upsell"

in every row

s2!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Saggy
Sr. Member
 
Total Posts:  133
Joined:  2009-02-03
 
amartinez - 05 May 2009 10:56 PM

Hi,

The first issue I find is “Skip import row, required field “sku” not defined”.

You have SKU row, but if you see the XML Actions:

<action type="dataflow/convert_parser_csv" method="parse">
<var name="delimiter"><![CDATA[,]]></var>
<var name="enclose"><![CDATA["]]></var>
<var name="fieldnames">true</var>
<var name="store"><![CDATA[0]]></var>
<var name="number_of_records">1</var>
<var name="decimal_separator"><![CDATA[.]]></var>
<var name="adapter">catalog/convert_adapter_products.........</var>
<var name="method">parse</var>
</action>

profile use “ for enclose every row… your product.csv don’t have “ in every row!!!

please change it & try again wink

example, from:

store,websites,attribute_set,type,sku,category_ids,has_options,name,url_key,gift_message_available,meta_title,meta_description,image,small_image,thumbnail,custom_design,options_container,image_label,small_image_label,thumbnail_label,url_path,price,special_price,description,short_description,meta_keyword,custom_layout_update,special_from_date,status,visibility,tax_class_id,disable_googlecheckout,color,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_automatically,features,grouped,crosssell,upsell

to:

"store","websites","attribute_set","type","sku","category_ids","has_options","name","url_key","gift_message_available","meta_title","meta_description","image","small_image","thumbnail","custom_design","options_container","image_label","small_image_label","thumbnail_label","url_path","price","special_price","description","short_description","meta_keyword","custom_layout_update","special_from_date","status","visibility","tax_class_id","disable_googlecheckout","color","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_automatically","features","grouped","crosssell","upsell"

in every row

s2!

Hi,

Thanks for your reply.

I have tried putting everything in double quotes but that didn’t solve the problem. And I can confirm that nothing is wrong in the file as when I run the same file manually from advanced profile then it works. But doesn’t work when I run from the browser. And the most annoying thing is that it does work for rest of the columns only grouped column doesn’t get imported even though it’s calling this function ($product->setGroupedLinkData($linkIds);)

Cheers
S

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 

uhm I see that you don’t have an “associated” row

you need an attribute row too: “config_attributes” (show_size in my example) then the row “shoe_size” sets the correct value

please analize my example, and change step by step to adjust to your needs

luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Saggy
Sr. Member
 
Total Posts:  133
Joined:  2009-02-03
 
amartinez - 06 May 2009 12:32 AM

uhm I see that you don’t have an “associated” row

you need an attribute row too: “config_attributes” (show_size in my example) then the row “shoe_size” sets the correct value

please analize my example, and change step by step to adjust to your needs

luck!

Associated column and config_attributes are needed for configurable product type not for grouped product type. As I said earlier that there is nothing wrong in the file as it does work manually from advanced profile.

Cheers
S

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 

But if you see the cron_import_1.3.php script, these columns are used in grouped products too! We link with the “parent” grouped product the products stored in these column ("associated")

If you don’t use these column, you can change the script.

Bye,

 
Magento Community Magento Community
Magento Community
Magento Community
 
Saggy
Sr. Member
 
Total Posts:  133
Joined:  2009-02-03
 

Thanks for your patience with me. Just one last question if you are using the SAVEROW function (in cron job) then why are you using custom sql queries to insert data. As setGroupedLinkData or setConfigurableProductsData functions should do the job. Isn’t it?

The reason I am asking this is because advaced profile doesn’t use this cron script but still works without custom sql inserts.

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Saggy
Sr. Member
 
Total Posts:  133
Joined:  2009-02-03
 

Hi Antonio,

My issue has been resolved now. I have created a custom module which has been running as a cron job and it is not using any sql inserts.

Thanks for trying to help me man. Highly appreciated.

Cheers
S

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