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

Page 34 of 35
A suggestion to import configurable products + categories
 
cassitobonne
Jr. Member
 
Total Posts:  10
Joined:  2009-10-06
 

khublaikhan Thank you a lot dude, your description of how to convert UTF-8 helped me a lot, I had no idea about this!
you saved my skin!
hahahaahah

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

Dear Friends,

Even though this script is still useful (I have it running in more than 10 stores in any versions), now you can test the new 1.5 version here: http://www.magentocommerce.com/boards/viewthread/227005

Regards!

 
Magento Community Magento Community
Magento Community
Magento Community
 
andi
Member
 
Avatar
Total Posts:  54
Joined:  2007-09-19
Munich
 

Hello,

im using Magento 1.4.2 and have the same issue, that after starting the profil, the content of the magento Backend is just blank and nothing happen. Is there any soulition to fix this with magento 1.4.2?

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 
andi - 18 May 2011 02:48 PM

Hello,

im using Magento 1.4.2 and have the same issue, that after starting the profil, the content of the magento Backend is just blank and nothing happen. Is there any soulition to fix this with magento 1.4.2?

sure!

but I think we can use these time and efforts by upgrading to magento 1.5.1…

if you think not, please revise this entire post

regards!

 
Magento Community Magento Community
Magento Community
Magento Community
 
andi
Member
 
Avatar
Total Posts:  54
Joined:  2007-09-19
Munich
 

Hello amartinez,

have you tested your Script with 1.4.2??? I have reade almost all of this thread and have tested some other scripts listed in this thread, but nothing work with 1.4.2.

To update to 1.5.1 is sadly no option for this project because of some extensions, which only run on < 1.5

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

Yes, I’m running this script in some 1.4 magento versions (real production stores)

But logically, I adapt these scripts or change some parts to my customer needs.

Take the script as “basic startup point”, then extend what you need from it

 
Magento Community Magento Community
Magento Community
Magento Community
 
shiwak224
Member
 
Total Posts:  41
Joined:  2011-03-23
 

Can someone tell me where are these files productimport.php and others?? I am newbie in magento trying to work in this system . please help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
miah
Jr. Member
 
Total Posts:  6
Joined:  2011-05-05
 

Hi,

I have been trying to get import working on magento 1.3.3.0 for a while now, and have successfully managed to import both simple products and configurable ones, all with images.

However one problem remains, and although I’ve seen a few people mention this, I’ve not yet been able to find a definitive answer and therefore fix.

Configurable products with multiple config_attributes do not seem to work as expected, either when running the advanced profile manually from the admin interface, or when running the cron job.

My test case involves a configurable product with two config_attributes. I have three rows in my CSV file, two simple products and the configurable product that should join them together. All three products are created and appear in the magento admin interface. The simple products always seem to work as expected in isolation.

When run from the admin interface, I can click on the configurable product in the manage products page and view its settings. The two simple products don’t appear under associated products. I can also search for the product in the front end, click on it and view it’s page.

When run from cron, I cannot click on the configurable product in the manage products page and view its settings. It is not searchable from the front end, but can be found if you manually enter the correct URL.

I receive the following error when viewing from the products page: Fatal error: Call to a member function getId() on a non-object in ..../magento/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php on line 221

I receive the following error when viewing from the front end: Fatal error:  Call to a member function getId() on a non-object in ..../magento/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php on line 62

I’ve tested the following combinations with the same test data and just changing around the config_attributes value:
- size,colour: results in the errors
- colour,size: results in the errors
- size, colour: results in the errors
- size: no errors, but obviously colour information doesn’t appear on the configurable product
- colour: no errors, but obviously size information doesn’t appear on the configurable product

If anyone can suggest anything else I can try to get this working, it would be much appreciated. Upgrading magento isn’t currently an option - it’s on the plan, but can’t happen short term.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
miah
Jr. Member
 
Total Posts:  6
Joined:  2011-05-05
 
miah - 21 March 2012 11:45 PM

Hi,

If anyone can suggest anything else I can try to get this working, it would be much appreciated. Upgrading magento isn’t currently an option - it’s on the plan, but can’t happen short term.

Thanks.

Some lengthy debugging later, I’ve identified the problem and come up with a solution. The product import cron script does not correctly handle configurable products with multiple attributes, and ends up inserting invalid data into the database when presented with this.

Replace the section that handles configurable products in cron_import_products.php with the following code to resolve this issue:

if ( $importData['type'== 'configurable' // for configurable products
                                   
$parent_id $write -> fetchOne"select * from $product_table where sku='" $importData['sku'"'" );
                                   
$config_attributes explode(','$importData['config_attributes']);
                                
array_walk($config_attributescreate_function('&$v,$k''$v = "\'".trim($v)."\'";'));
                                
$attribute_ids $write -> fetchAll"select attribute_id from $attribute_table where attribute_code in (" implode(','$config_attributes) . ")" );
                                foreach (
$attribute_ids as $row)
                                
{
                                    $attribute_id 
$row['attribute_id'];
                                    
$super_attribute_id $write -> fetchOne"select product_super_attribute_id from $super_attribute_table where product_id=" .
                                                                              ( int )
$parent_id " and attribute_id = " . ( int )$attribute_id );
                                    if (!
$super_attribute_id)
                                    
{
                                        $write 
-> query"insert into $super_attribute_table (product_id, attribute_id) values (" . ( int )$parent_id ", " . ( int )$attribute_id ")" );
                                    
}
                                }
                                   
foreach ( explode','$importData['associated') as $product_sku {
                                    
try {
                                           $product_id 
$write -> fetchOne"select * from $product_table where sku='$product_sku'" );
                                        if ( !
$write -> fetchOne"select * from $super_link_table where parent_id=" . ( int )$parent_id " and product_id=" . ( int )$product_id ) ) {
                                            $write 
-> query"insert into $super_link_table (parent_id, product_id) values (" . ( int )$parent_id ", " . ( int )$product_id ")" );
                                            
}
                                        }
                                    
catch ( Exception $e {
                                        printf
"ROW " $recordCount ", PARENT SKU " $importData['sku'", PRODUCT SKU " $product_sku " - " $e -> getMessage() . "\n" );
                                        
}
                                    }
                                }

Enjoy.

 
Magento Community Magento Community
Magento Community
Magento Community
 
naveenosgroup
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2010-06-28
India
 

Hello Everybody,

Anyone know how can we import multiple files using profile?

In admin we have facility to select a file and run profile to import. But I want to set cron file that is able to select all files folder in ‘var/import/’ one by one and execute them without conflict.

 
Magento Community Magento Community
Magento Community
Magento Community
 
qinwubi
Jr. Member
 
Total Posts:  6
Joined:  2011-11-01
 

for those of you having,

Fatal error: Class 'Mage_Catalog_Model_Convert_Adapter_Productimport' not found in magento/includes/src/Mage_Dataflow_Model_Convert_Action_Abstract.php

it’s because you’ve enabled compilation. try either disable compilation or rename the files and copy to includes/src.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pddejager
Jr. Member
 
Total Posts:  1
Joined:  2012-07-30
 

Tried this and having a lot of problems..

Magento 1.7.2? fresh install TODAY

I kept everything the same BUT renamed the csv to products.csv

Starting profile execution, please wait…
Warning: Please do not close the window during importing/exporting data

Starting Mage_Dataflow_Model_Convert_Adapter_Io :: load
Loaded successfully: \"/web/odesk21/var/import/products.csv\".
Starting Mage_Dataflow_Model_Convert_Parser_Csv :: parse
Method \"parse\" not defined in adapter catalog/convert_adapter_productimport.
Finished profile execution.

Uhm… I freely admit I am new to magento not to OOP and PHP… not sure what I am doing wrong

HELP!

 
Magento Community Magento Community
Magento Community
Magento Community
 
MCPete
Jr. Member
 
Total Posts:  8
Joined:  2012-08-28
 

Hi guys,

A few days ago I had to import 7000 products and I used dataflow. But it was too slow.
Then I find this service - file2cart.
And it worked great!
Maybe somebody knows other similar services?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jimi007
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2012-10-23
 

Hi,

First of all i love this great script and its help a lot when there is no other solution rather to buy a extension.

I have setup this but facing few problem in importing configurable products

> Download and uploaded “Productimport.php” file to /var/www/magento/app/code/local/Mage/Catalog/Model/Convert/Adapter/

> upload cron_import_products.php in root and set permission also

create profile and then insert code and csv file name.

upload images in media>import
upload csv in var/import/

import is executed successfully with out any error but the problem facing is

1-Thumbnail is not shown but small image is visible
2- both configurable and simple products shown out of stock because of that configurable also not shown at product page

Author, developer, any one please help me to fix this one

>> CSV is attached

Thanks in advance for this great forum and script and all replies.

File Attachments
configured.zip  (File Size: 1KB - Downloads: 210)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Zarathus
Jr. Member
 
Total Posts:  2
Joined:  2012-10-10
 

Configurable works !

importing configurable products in magento using magmi -

inventory & images - all works perfect for me. Let me try to see what can go wrong:

1. visibility - not that for simple product visibility =0 and for configurable should be 2,3 or 4
2. Stock - configurable product should be use_config_manage_stock=0 and for simple product this will probably be 1 if you want to manage the stock
3. magmi - you need to add the column configurable_attributes to list the attributes who control it.

see the attached sample - creating 1 product - 1 configurable product (very last entry) and 9 simple product (3 colors X 3 size from each color)

the attached is working, images as well - let me know if you have questions.

Tamir

File Attachments
configurable works.xls  (File Size: 30KB - Downloads: 269)
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 34 of 35