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

AMartinez_CustomImportExport 1.5 extension: import/export/and more…! 
 
py_peneau
Jr. Member
 
Total Posts:  2
Joined:  2012-04-16
 

Does it works with the 1.7.0.0 version ? I installed this version with sample data.

I try

php -f amartinez_customimportexport.php -- -e test.csv
and I got this error :

Start products output to file test.csv
PHP Fatal error
:  Uncaught exception 'Exception' with message 'Notice: Undefined index:   in /var/www/magento/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line 539' in /var/www/magento/app/code/core/Mage/Core/functions.php:245
Stack trace
:
#0 /var/www/magento/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php(539): mageCoreErrorHandler(8, 'Undefined index...', '/var/www/magent...', 539, Array)
#1 /var/www/magento/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php(955): Mage_ImportExport_Model_Export_Entity_Product->_updateDataWithCategoryColumns(Array, Array, 16)
#2 /var/www/magento/app/code/community/AMartinez/CustomImportExport/Model/Export.php(27): Mage_ImportExport_Model_Export_Entity_Product->export()
#3 /var/www/magento/app/code/community/AMartinez/CustomImportExport/shell/run.php(83): AMartinez_CustomImportExport_Model_Export->export()
#4 /var/www/magento/app/code/community/AMartinez/CustomImportExport/shell/run.php(661): AMartinez_CustomImportExport->run()
#5 /var/www/mag in /var/www/magento/app/code/core/Mage/Core/functions.php on line 245

Fatal errorUncaught exception 'Exception' with message 'Notice: Undefined index:   in /var/www/magento/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line 539' in /var/www/magento/app/code/core/Mage/Core/functions.php on line 245

Exception
NoticeUndefined index:   in /var/www/magento/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line 539 in /var/www/magento/app/code/core/Mage/Core/functions.php on line 245

Call Stack
:
    
0.0001     319916   1. {main}() /var/www/magento/amartinez_customimportexport.php:0
    0.0015     477056   2. 
require_once('/var/www/magento/app/code/community/AMartinez/CustomImportExport/shell/run.php') /var/www/magento/amartinez_customimportexport.php:15
    0.0893    7723040   3. AMartinez_CustomImportExport
->run() /var/www/magento/app/code/community/AMartinez/CustomImportExport/shell/run.php:661
    0.2189    8025016   4. AMartinez_CustomImportExport_Model_Export
->export() /var/www/magento/app/code/community/AMartinez/CustomImportExport/shell/run.php:83
    2.7010   15847028   5. Mage_ImportExport_Model_Export_Entity_Product
->export() /var/www/magento/app/code/community/AMartinez/CustomImportExport/Model/Export.php:27
    7.8007   23863884   6. Mage_ImportExport_Model_Export_Entity_Product
->_updateDataWithCategoryColumns() /var/www/magento/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php:955
    7.8007   23865140   7. mageCoreErrorHandler
() /var/www/magento/app/code/core/Mage/Core/functions.php:0

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mengqing
Jr. Member
 
Total Posts:  10
Joined:  2011-09-12
 

For anyone trying to get multiselect working

--- a/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product.php
+++ b/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product.php
@@ -41,+41,@@ class AMartinez_CustomImportExport_Model_Import_Entity_Product extends Mage_Impo
                 $valid 
= (float)$val == $val;
                 break;
              case 
'select':
+            case 
'multiselect':
                 foreach (
explode(","$rowData[$attrCode]) as $code)
                 
{
                                        $valid 
= isset($attrParams['options'][strtolower($code)]);
 
Magento Community Magento Community
Magento Community
Magento Community
 
py_peneau
Jr. Member
 
Total Posts:  2
Joined:  2012-04-16
 

My error is due to an error in Magento code. I’ll develop a module to fix that. For the time being, edit /var/www/magento/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php like this :

protected function _updateDataWithCategoryColumns(&$dataRow, &$rowCategories$productId)
{
    
if (!isset($rowCategories[$productId])) {
        
return false;
    
}

    $categoryId 
array_shift($rowCategories[$productId]);
    if (!isset(
$categoryId)) return false// LINE TO ADD
    
$dataRow[self::COL_ROOT_CATEGORY] $this->_rootCategories[$categoryId];
    if (isset(
$this->_categories[$categoryId])) {
        $dataRow[self
::COL_CATEGORY] $this->_categories[$categoryId];
    
}

    
return true;
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
lash
Jr. Member
 
Total Posts:  25
Joined:  2008-11-20
 

Hey,

is there a way to use categories with slashes in its name?
As far as I saw the only way to do this is to change the category separator, but I don’t really now where I should change it.

In AMartinez_CustomImportExport_Model_Import_Entity_Product there’s a function _addCategory(). Is this the only place I have to change the separator?

thanks and regards,

lash

 
Magento Community Magento Community
Magento Community
Magento Community
 
MyGoto
Jr. Member
 
Total Posts:  2
Joined:  2010-02-05
 
schakenraadjuh - 24 April 2012 07:19 AM

Very usefull plugin! Love to use it grin Though when I want to import prices only it sets quantity to 0 and availability to “out of stock”. Does anyone know a solution to that problem? The CSV is:

"sku","price","special_price","cost"
"240004"
,"14.95","","6.84"
"24902341001"
,"12.95","","7.4"
"850109"
,"14.95","","6.5"

Thanks in advance!

Are you doing Ama...php—-b append -a -i file.csv

That way it appends only and doesnt update fields not present

 
Magento Community Magento Community
Magento Community
Magento Community
 
villocci
Jr. Member
 
Total Posts:  11
Joined:  2008-06-24
 

@ py_peneau
Sorry but i find some problem with magento 1.6.2 also during import with normal procedure of magento (under system - import/export).
After installing amartinez_customimportexport during the first exporting i receive this message:

Start products output to file var/customimportexport/products.csv

Fatal error: Uncaught exception ‘Exception’ with message ‘Warning: fopen(var/cus
tomimportexport/products.csv): failed to open stream: No such file or directory
in C:\xampp\htdocs\sesto\app\code\community\AMartinez\CustomImportExport\shell\
run.php on line 81’ in C:\xampp\htdocs\sesto\app\code\core\Mage\Core\functions.p
hp:245
Stack trace:
#0 [internal function]: mageCoreErrorHandler(2, ‘fopen(var/custo...’, ‘C:\xampp\
htdocs...’, 81, Array)
#1 C:\xampp\htdocs\sesto\app\code\community\AMartinez\CustomImportExport\shell\r
un.php(81): fopen(’var/customimpor...’, ‘w’)
#2 C:\xampp\htdocs\sesto\app\code\community\AMartinez\CustomImportExport\shell\r
un.php(661): AMartinez_CustomImportExport->run()
#3 {main}
thrown in C:\xampp\htdocs\sesto\app\code\core\Mage\Core\functions.php on line
245

have you find the same problem and the solution?

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
cmcaniff
Jr. Member
 
Total Posts:  1
Joined:  2011-01-06
 

Hi,

I am trying to import grouped items using the _associated_sku and _associated_position columns

using the 1 line csv format - see attached

I tried using 1,2,3 in the _associated_position column and also tried the column name of *_associated_position

Associated sku imports correctly but the associated_position won\’t import

Does anyone know the correct format ?

Chris

File Attachments
amartinez_current.zip  (File Size: 1KB - Downloads: 115)
 
Magento Community Magento Community
Magento Community
Magento Community
 
rbostan
Jr. Member
 
Total Posts:  25
Joined:  2007-09-12
Istanbul - Turkey
 

Hi,
i’m using 1.7.0 and extension installed without error.

when when hit the

php -./amartinez_customimportexport.php -- -e
in magento root,it says

Could not open input file: ./amartinez_customimportexport.php
 
Magento Community Magento Community
Magento Community
Magento Community
 
ducadj
Jr. Member
 
Total Posts:  6
Joined:  2011-09-22
 

Hi to all,

with this extension, can i import big number of products? 50-100K?

Now, i import using external software and its import ok.
My problem are:

- Reindex (is not possible that for any change, reindex all products starting from the first!!.)
Is possible to reindex only last/updated products?
- I dont see product on my site
(in admin is all ok Enabled, category assigned, related product is ok, visibility, site, etc
but in front-ent i dont see this…

How i can solve?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
hippoglollum
Sr. Member
 
Total Posts:  97
Joined:  2010-04-07
 

After the update to magento 1.7.0.1 CE it is broken

I can’t import configurable product using the same csv files i used before update

I also try with test_configurable.csv file that came with the extension.

if i execute

php -f amartinez_customimportexport.php -- -all -import var/customimportexport/test_configurable.csv

i obtain the following error

Start products 'replace' action from ../shop/var/customimportexport/test_configurable.csv
:::: New category createdTEST COLLECTION (first ocurrence in line 1) ::::
PHP Fatal error:  Uncaught exception 'Mage_Core_Exception' with message 'File var/tmp/test_configurable.tmp.0.csv contains 28 corrupt records (from a total of 28)
:::: Required attribute '
taglia' has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Required attribute '
colore' has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Attribute with this code is not super ::::
In Line(s) 15

:::: Orphan rows that will be skipped due default row errors ::::
In Line(s) 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
in app/Mage.php:594
Stack trace
:
#0 app/code/community/AMartinez/CustomImportExport/shell/run.php(124): Mage::throwException('File /home/clien...')
#1 app/code/community/AMartinez/CustomImportExport/shell/run.php(661): AMartinez_CustomImportExport->run()
#2 amartinez_customimportexport.php(15): require_once('/home/client1/...')
# in app/Mage.php on line 594

Fatal errorUncaught exception 'Mage_Core_Exception' with message 'File var/tmp/test_configurable.tmp.0.csv contains 28 corrupt records (from a total of 28)
:::: Required attribute '
taglia' has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Required attribute '
colore' has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Attribute with this code is not super ::::
In Line(s) 15

:::: Orphan rows that will be skipped due default row errors ::::
In Line(s) 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
in app/Mage.php:594
Stack trace
:
#0 app/code/community/AMartinez/CustomImportExport/shell/run.php(124): Mage::throwException('File /home/clien...')
#1 app/code/community/AMartinez/CustomImportExport/shell/run.php(661): AMartinez_CustomImportExport->run()
#2 amartinez_customimportexport.php(15): require_once('/home/client1/...')
# in app/Mage.php on line 594

Someone in the forum recomanded to change the csv positioning the configurable product records after the simple products ones.
I didn’t try this solution because my csv file is generated by an external agency, so I wish everything worked like before.

Can anyone give me a solution?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Stefy
Member
 
Avatar
Total Posts:  36
Joined:  2009-03-30
 

Hi,
i love this extension.. <3

Somebody know how i can deleteallproducts without delete root and non root category?

Or

when i import from a csv how i can use the existing category??

Thanks in advance.. bye

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mutant_Tractor
Jr. Member
 
Total Posts:  1
Joined:  2012-07-17
 
hippoglollum - 28 June 2012 06:47 AM

After the update to magento 1.7.0.1 CE it is broken

I can’t import configurable product using the same csv files i used before update

I also try with test_configurable.csv file that came with the extension.

if i execute

php -f amartinez_customimportexport.php -- -all -import var/customimportexport/test_configurable.csv

i obtain the following error

Start products 'replace' action from ../shop/var/customimportexport/test_configurable.csv
:::: New category createdTEST COLLECTION (first ocurrence in line 1) ::::
PHP Fatal error:  Uncaught exception 'Mage_Core_Exception' with message 'File var/tmp/test_configurable.tmp.0.csv contains 28 corrupt records (from a total of 28)
:::: Required attribute '
taglia' has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Required attribute '
colore' has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Attribute with this code is not super ::::
In Line(s) 15

:::: Orphan rows that will be skipped due default row errors ::::
In Line(s) 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
in app/Mage.php:594
Stack trace
:
#0 app/code/community/AMartinez/CustomImportExport/shell/run.php(124): Mage::throwException('File /home/clien...')
#1 app/code/community/AMartinez/CustomImportExport/shell/run.php(661): AMartinez_CustomImportExport->run()
#2 amartinez_customimportexport.php(15): require_once('/home/client1/...')
# in app/Mage.php on line 594

Fatal errorUncaught exception 'Mage_Core_Exception' with message 'File var/tmp/test_configurable.tmp.0.csv contains 28 corrupt records (from a total of 28)
:::: Required attribute '
taglia' has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Required attribute '
colore' has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Attribute with this code is not super ::::
In Line(s) 15

:::: Orphan rows that will be skipped due default row errors ::::
In Line(s) 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
in app/Mage.php:594
Stack trace
:
#0 app/code/community/AMartinez/CustomImportExport/shell/run.php(124): Mage::throwException('File /home/clien...')
#1 app/code/community/AMartinez/CustomImportExport/shell/run.php(661): AMartinez_CustomImportExport->run()
#2 amartinez_customimportexport.php(15): require_once('/home/client1/...')
# in app/Mage.php on line 594

Someone in the forum recomanded to change the csv positioning the configurable product records after the simple products ones.
I didn’t try this solution because my csv file is generated by an external agency, so I wish everything worked like before.

Can anyone give me a solution?

Thanks

This error means you need to fill in a value for that column on those rows:
:::: Required attribute ‘taglia’ has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

:::: Required attribute ‘colore’ has an empty value ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

This error means that the attribute (or attributes) you are trying to import either does not exist or isn’t “Global” change the attribute to global or add them as new global attributes and it will work.
:::: Attribute with this code is not super ::::
In Line(s) 15

 
Magento Community Magento Community
Magento Community
Magento Community
 
cconway
Jr. Member
 
Total Posts:  7
Joined:  2011-08-24
 

Has anybody gotten this extension to install and work correctly on Magento 1.7?

 
Magento Community Magento Community
Magento Community
Magento Community
 
c0da666
Jr. Member
 
Total Posts:  1
Joined:  2011-06-09
 

Hello Amartinez,

your extension works like a charm, but i have only one problem.
I want to execute the cron observer of your extension via the cron.php but it gives me just nothing, the job gets from pending to finished
(i can see that nicely thanks to another extension)
I looked in the log, where normally i get at least the notification of the start. But nothing is there
is it possible to run the import on cron.php ?

Also for the people who wonder about 1.7 and this extension, i got it working with 1.7.0.0 1.7.0.1 and 1.7.0.2, i cant remember exactly but it went pretty smooth

kind regards c0da

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dannesthlm
Jr. Member
 
Total Posts:  1
Joined:  2011-06-21
 

This is working for the most, but I\’ve got one problem. Some products of the stock are not imported to every store (we have 5). Not many, still not more than a few percent, everything seems good in the CSV, we have one option under every product under the store category.

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