I am using Magento ver. 1.4.1.1 and have tried using this importer. Most things work, but it does not import “associated” column for my Grouped Products.
I have my associated products like “prod01,prod02,prod03”.
SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘value’ cannot be null
It’s importing the simple products, but not the configurable. Anyone else getting this error? I’m using the sample csv amartinez posted here on this thread.
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?
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…
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
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.
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_attributes, create_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" ); } } }
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.
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.
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?