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…! 
 
Bing Dicklepuss
Sr. Member
 
Total Posts:  91
Joined:  2010-07-26
 
Neo_7 - 07 September 2011 02:57 AM

Hi all:
probably this post should be in the section for “clumsy.” Anyway, I’ve spent hours reading the forums and I can not import my products with this extension: First I use xampp as a local server and I can not run the Putty with it (after reading a lot, do not even know if this is possible).
Second, if I try to make it run through the admin panel (System / Import-Export /), does not import anything, does not recognize such areas as “sku, type, ...”

Any suggestion is welcome

You can’t run this extension through the admin.

If you have it installed in windows and it’s on your own computer you’re sitting at, then there’s no reason to use putty.

Just go to the Windows start menu and enter “cmd” into the search box and press “Enter” and the terminal should open up.
Then just navigate to your Magento root folder.  That’s where you’ll execute the script.

It’s probably in C:\xampp\www\magento\ or C:\xampp\www\ I’m guessing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bary
Jr. Member
 
Total Posts:  12
Joined:  2010-11-18
 

Hi,
on your extension page you write:

Multivalued fields:
Only with CSV1 files, these fields are automatically processed as multivalued:
_store
visibility
_category
_associated_sku
_media_image
_media_attribute_id
_media_label
_media_position
_media_is_disabled
To define your own ones, use * (this overrides default values)
sku ,*_category ,*_associated_sku
TEST,"CAT1/CAT2,CAT3”,"ASSOCIATED1,ASSOCIATED2”

I do not understand one thing: why I should use *_category when _category is automatically processed as multivalue? I have read all discussion and I still do not understand what is different between *_something and just _something. Thank you for an answer.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bing Dicklepuss
Sr. Member
 
Total Posts:  91
Joined:  2010-07-26
 
Bary - 08 September 2011 05:35 AM

Hi,
on your extension page you write:

Multivalued fields:
Only with CSV1 files, these fields are automatically processed as multivalued:
_store
visibility
_category
_associated_sku
_media_image
_media_attribute_id
_media_label
_media_position
_media_is_disabled
To define your own ones, use * (this overrides default values)
sku ,*_category ,*_associated_sku
TEST,"CAT1/CAT2,CAT3”,"ASSOCIATED1,ASSOCIATED2”

I do not understand one thing: why I should use *_category when _category is automatically processed as multivalue? I have read all discussion and I still do not understand what is different between *_something and just _something. Thank you for an answer.

AMartinez seems to have disappeared, so it may be hard to get the answer to your question.

I have been using .csv1 format almost every time, but I have been using “*_category” for the category field and “_media_image” for that field.  Perhaps I should be using the * for both, because I did have some errors occur.  But when I imported a file with just “sku”, “_store”, “_websites”, and the image fields without *, they did work (no asterisks).

Maybe he is saying you don’t need the * for those fields, and his example is just showing you what to do with any other fields???????

Also, do not confuse “multi-value” with “multi-select attribute” fields.  If you have color as a multi-select attribute and you have an item that is blue and green, then you would put “blue,green” as the value and you would not use an asterisk in the header.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Neo_7
Jr. Member
 
Total Posts:  7
Joined:  2011-04-04
 

Thanks Bing for your reply but I\’ve gone through the cmd windows to:
C: \ xampp \ htdocs \ magento and then php -f .... but of course this script is via shell. Should I install OpenSSH?

Thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bing Dicklepuss
Sr. Member
 
Total Posts:  91
Joined:  2010-07-26
 
Neo_7 - 08 September 2011 10:23 AM

Thanks Bing for your reply but I\’ve gone through the cmd windows to:
C: \ xampp \ htdocs \ magento and then php -f .... but of course this script is via shell. Should I install OpenSSH?

Thanks again

I use putty to connect to remote servers to do things on the command line.  But if the server is right in front of you, you don’t need that.  In windows, cmd is the command line.  SSH is for connecting to remote computers, not ones right in front of you.

You should be able to run the script just like I said.  You just have to find the magento root folder in your filesystem and go there in cmd (command prompt).  Then run the script.  Did you try that?  Did you get any error messages?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bary
Jr. Member
 
Total Posts:  12
Joined:  2010-11-18
 
Bing Dicklepuss - 08 September 2011 09:59 AM

AMartinez seems to have disappeared, so it may be hard to get the answer to your question.

I have been using .csv1 format almost every time, but I have been using “*_category” for the category field and “_media_image” for that field.  Perhaps I should be using the * for both, because I did have some errors occur.  But when I imported a file with just “sku”, “_store”, “_websites”, and the image fields without *, they did work (no asterisks).

Maybe he is saying you don’t need the * for those fields, and his example is just showing you what to do with any other fields???????

Also, do not confuse “multi-value” with “multi-select attribute” fields.  If you have color as a multi-select attribute and you have an item that is blue and green, then you would put “blue,green” as the value and you would not use an asterisk in the header.

Thanks for an answer. When I think about that I think I got it now wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Neo_7
Jr. Member
 
Total Posts:  7
Joined:  2011-04-04
 

I appreciate so much your help, but do not know what I’m doing wrong!
I am attaching a screenshot with the path to my root magento and the error it gives me:
(in English: “php” is not recognized as an internal or external command, program or batch file exec).

I tried to do the same via my laptop and gives me the same error, with the same magento version 1.5.1.0 but with a different theme.

As I’m in the process of developing my website and my hosting server does not allow the use of ssh command, I am very interested in load products via xampp and then upload all updated to the remote server.

Very grateful for your help

p.s.: Sorry, mistakenly sent to you by PM

Image Attachments
Sin título.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
phiber9
Member
 
Avatar
Total Posts:  41
Joined:  2010-05-26
Croatia
 
Neo_7 - 09 September 2011 02:41 AM

I appreciate so much your help, but do not know what I’m doing wrong!

Very grateful for your help

p.s.: Sorry, mistakenly sent to you by PM

PHP binary is not in your PATH environment variable.
Either add the php’s bin path to your PATH variable or run php with the full path, for example:
c:\php\bin\php .....

 
Magento Community Magento Community
Magento Community
Magento Community
 
dogger123
Jr. Member
 
Total Posts:  1
Joined:  2011-09-10
 

I seem to be able to perform a product export using the shell command as root.

However when logged into cPanel, I can’t seem to get cron working regardless of the paths.

Can someone post the command they are using in cPanel to get cron to work?

Thx!

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

Just wondering if it is possible to import products with store specific price with this script?

at the moment the price attribute is not multiselect, so how would I make it store specific?

 
Magento Community Magento Community
Magento Community
Magento Community
 
English87
Sr. Member
 
Total Posts:  80
Joined:  2009-08-12
 

The extension has been working great for a while, however recently (may have been since upgrading to 1.6.*) I have been getting an exception being thrown when there is a new option for a dropdown/multi-select, rather than the module creating that new option.

Example: I have an attribute ‘material’, the csv1 feed has a value in the material column: ‘Amethyst’ which isn’t yet an option for ‘material’. Below is the output for this example.

Start products 'replace' action from var/customimportexport/update.csv1

Fatal error
Uncaught exception 'Exception' with message 'Notice: Undefined index: amethyst  in /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product/Type/Simple.php on line 81' in /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/core/Mage/Core/functions.php:245
Stack trace
:
#0 /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product/Type/Simple.php(81): mageCoreErrorHandler(8, 'Undefined index...', '/var/www/vhosts...', 81, Array)
#1 /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product.php(295): AMartinez_CustomImportExport_Model_Import_Entity_Product_Type_Simple->prepareAttributesForSave(Array)
#2 /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php(335): AMartinez_CustomImportExport_Model_Import_Entity_Product->_saveProducts()
#3 /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/core/Mage/ in /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/core/Mage/Core/functions.php on line 245
PHP Fatal error:  Uncaught exception 'Exception' with message 'Notice: Undefined index: amethyst  in /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product/Type/Simple.php on line 81' in /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/core/Mage/Core/functions.php:245
Stack trace
:
#0 /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product/Type/Simple.php(81): mageCoreErrorHandler(8, 'Undefined index...', '/var/www/vhosts...', 81, Array)
#1 /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product.php(295): AMartinez_CustomImportExport_Model_Import_Entity_Product_Type_Simple->prepareAttributesForSave(Array)
#2 /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php(335): AMartinez_CustomImportExport_Model_Import_Entity_Product->_saveProducts()
#3 /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/core/Mage/ in /var/www/vhosts/hhogarth.co.uk/httpdocs/app/code/core/Mage/Core/functions.php on line 245

Previously the module would create the ‘Amethyst’ option for ‘material’ and continue successfully.

I’m aware that the extension only shows compatibility for Magento 1.6 but I was hoping it would ‘just work’! Anybody with experience of this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
English87
Sr. Member
 
Total Posts:  80
Joined:  2009-08-12
 

Regarding my previous question, I’ve spotted where the problem was arising. Attributes with type ‘multiselect’ weren’t getting checked for having new options, where ‘select’ type attributes were. I just added another ‘case’ to the switch statement in Product.php after ‘select’ and allowing the switch to fall through. It seems to work as expected, just the same as select attribute options.

diff --git a/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product.php b/app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product.php
index 860edbd
..139dadc 100644
--- 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)]);

Hope this helps somebody.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bing Dicklepuss
Sr. Member
 
Total Posts:  91
Joined:  2010-07-26
 

Thanks, English87. That looks like it might be useful.
I was thinking of trying to go into the code and improving the extension, but it’s quite complex. Maybe later.

 
Magento Community Magento Community
Magento Community
Magento Community
 
amint
Jr. Member
 
Total Posts:  9
Joined:  2010-05-08
 

hi all.

i have try to import and get this message

Done (processed rows count3713)
Recalculating catalog price rules...
Erasing catalog images cache...
Reindexing data...
        
Product Attributes... index was rebuilt successfully
        Product Prices
... index was rebuilt successfully
        Catalog URL Rewrites
... index was rebuilt successfully
        Product Flat Data
... index was rebuilt successfully
        Category Flat Data
... index was rebuilt successfully
        Category Products
... index was rebuilt successfully
        Catalog Search Index
... index was rebuilt successfully
        Stock Status
... index was rebuilt successfully
        Tag Aggregation Data
... index was rebuilt successfully
Cleaning cache
...

but no product show on backend, what should i do ?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

@amint

use magmi wink , it’s far more advanced that Amartinez script , but uses the dataflow format (which is magento historic format for csv)

just look at the post with the most replies on this thread.

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