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 1 of 4
Import products from a csv
 
Salustore
Member
 
Avatar
Total Posts:  73
Joined:  2008-09-02
 

I try to import a very simple cvs file made with notepad (not execel or any other kind of software)

here the example:

“sku”;"name”;"description”;"short_description”;"weight”;"price”;"store”;"tax_class_id"
“003”;"Revivogen”;"desc”;"desc”;"200.0000”;"10.0000”;"admin”;"default"

Here the result:
# Starting Mage_Dataflow_Model_Convert_Parser_Csv :: parse
# Found 1 rows
# Starting catalog/convert_adapter_product :: parse
# Skip import row, is not valid value “” for field “type”
# Processed 100% 1/1 records
# Imported 0 records

I read alomost 100 topic for this argoment, i try XML, csv from excel, and any kind of possible solution but No result.

The question is:
IT’s possible to have an official & clear answer form a Magento member for this question?

 
Magento Community Magento Community
Magento Community
Magento Community
 
twinkel
Jr. Member
 
Total Posts:  2
Joined:  2007-09-03
 

You have to set ‘type’ in your csv file.

So add a column, call it type and set ‘simple’ as value for the first row. (simple for smple product)

wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Salustore
Member
 
Avatar
Total Posts:  73
Joined:  2008-09-02
 

You are my “"God"…

Thank U very much

 
Magento Community Magento Community
Magento Community
Magento Community
 
eshban
Member
 
Total Posts:  40
Joined:  2009-01-25
 

not works for me, can you plz upload your csv file and screenshot of mapping fields plz? may be i do some mistake anywhere. Plz help . thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
ellisojl
Jr. Member
 
Total Posts:  6
Joined:  2008-09-15
El Centro, CA
 

One thing I noticed that caused my export/edit/import to fail is the export added a space at the end of the word configurable in the type column and then the import didn’t recognize it as a valid type

 
Magento Community Magento Community
Magento Community
Magento Community
 
Master Jrock
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2008-11-30
Los Angeles, California
 
twinkel - 21 October 2008 12:25 AM

You have to set ‘type’ in your csv file.

So add a column, call it type and set ‘simple’ as value for the first row. (simple for smple product)

wink

Also, be sure to get rid of all empty columns. The import function assumes there’s a value on all rows for parsing. If it’s empty, it will not skip field value mapping and eventually you’ll get a field type error.

 
Magento Community Magento Community
Magento Community
Magento Community
 
designSpecies
Jr. Member
 
Total Posts:  4
Joined:  2009-04-22
 

I tried the suggestion from above:

1) Create a new product.

2) Export that product.

3) Open that file and you now have a template to import.

4) Copy and paste all the data from your suppliers CSV file into the appropriate columns. No mapping required if you do it this way as the column names will be correct in the beginning.

This worked well and the I was able to upload products onto my site. A couple crucial issues however.

1. I am uploading several simple products to be associated with a grouped product. I would like to know if there is a way to associate the simple product with the group product through the CSV; as of right now when I upload I have to associate them manually through the admin.

2. This is the maddening part: none of the items uploaded through the CSV can be searched by size, color, or other attributes in the advanced search, nor do they show up on the left “shop by” column. I know my attributes are set up correctly though, because the products I’ve set up manually DO show up correctly. And I’ve been careful to enter the attributes correctly into the CSV.

3. “As low as” pricing on the thumbnail view no longer appears, even though I’ve specified it in the CSV. It does not come up once I manually associate simple products with the group product either.

Has anyone else had this problem, and what did you do to fix it? I’ve tried deleting the empty columns and uploading again, that does not help. Neither does just setting up the grouped product manually.

Thank you for reading cheese

 
Magento Community Magento Community
Magento Community
Magento Community
 
Grover
Jr. Member
 
Total Posts:  2
Joined:  2009-02-24
 

Could be that in the ‘visibility’ field there’s a comma between ‘category and ‘search’, which may be tricking the system, leaving you with a
mere category option. The comma is the feild seperator, so having one actually inside a feild is very tricky.

 
Magento Community Magento Community
Magento Community
Magento Community
 
itchytrig
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2008-10-03
UK
 

Hi,

Importing / Exporting products questions, though it relates to Customers and others too I guess!

1) When you export a sample set of products, you get the headers, but no Product ID field?

2) Don’t we need the Product ID field in order to; Update existing products?

3) When Importing, how can you set Magento to either;

a - Drop all and Insert New
b - Run a Straight Insert (adds additional products)
c - Just Update Matching Products (is this where we need the Product ID field or does it use the SKU???)

Looking forward to this a great deal, just need a pointer in the right direction…

THANKS smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
ckosny
Guru
 
Total Posts:  349
Joined:  2009-02-28
Luxembourg
 

@ itchytrig

Internally Magento uses a product id which is just the autoincrement value of the product table and thus differs from the sku. Magento uses the sku as identifier for the product during the import. If a product with a certain sku already exists, it will be updated, otherwise it will be inserted as new product.
This is quite useful because the sku comes from your stock system, so you don’t need to adapt any product identifiers to Magento’s internal product id.

So basically b) and c) in your list can be influenced by the content of your csv file.
In regards to a): If you really want to drop all and insert new (why?), you need to go to the admin interface, delete all products there and the run the import. But note that this will most likely destroy all connections between e.g. products and order history and thus mess up order statistics and such.

Just be careful with your skus - if your sku contains only numbers, magento sometimes confuses a sku with it’s internal product id (especially when using the API). So better make sure that your sku always contains at least one letter.

Good luck

Claudia

 
Magento Community Magento Community
Magento Community
Magento Community
 
itchytrig
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2008-10-03
UK
 

Claudio (or anyone),

Hi, thanks for the confirmation of use… Basically Magento are trying to make it easier to use than I first thought!

Hmmm, so if I only want to update say one product field, can I just import:

Product SKU. (the identifier)
Then the Product Field I wish to change

Or do I have to import the full sheet each time, which is getting pretty big!

Thanks again! smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Joel Mellon
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2008-12-31
Cincinnati Ohio
 

Different error same process.  I believe I understand the csv upload process but am getting an error during the execution.  Error: write to file batch_XX.tmp where XX is the numbered attempt.  It appears the script fails because it cannot write a file.  I suspect it is a file permission issue.  I have changed all directories and files permissions to 777 during this troubleshooting effort without success.  This error is reported after Starting Mage_Dataflow_Model_Convert_Parser_Csv :: parse sequence.  An image of the Magento generated error log attached.  Server logs point to specific directory activity in /system_convert_gui/ However more clarity would be helpful.  I have not installed the certificate yet on this site and do not believe this to be the issue.

Any guidance would be appreciated.

Image Attachments
magento_import_log.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
ckosny
Guru
 
Total Posts:  349
Joined:  2009-02-28
Luxembourg
 

@ itchytrig: I don’t know. I don’t use the dataflow for export/import anymore so I don’t really know what data you need for updating a product. I would presume that you need at least the store so magento knows where the product belongs. I would suggest just to try with the minimum set of data in a csv and if necessary then add the column that magento is complaining about.

@ Joel Mellon: Are you a php developer?
If yes, have a look at the file /lib/Varien/Io/File.php, at the function ‘streamOpen’.
Find out what values you have for $this->_cwd and for $fileName - maybe that will help you to figure out what’s going on.

Good luck

Claudia

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dannyz1984
Sr. Member
 
Avatar
Total Posts:  153
Joined:  2009-04-12
 
itchytrig - 21 May 2009 01:15 AM

Claudio (or anyone),

Hi, thanks for the confirmation of use… Basically Magento are trying to make it easier to use than I first thought!

Hmmm, so if I only want to update say one product field, can I just import:

Product SKU. (the identifier)
Then the Product Field I wish to change

Or do I have to import the full sheet each time, which is getting pretty big!

Thanks again! smile

i have to duplicate the row for every single thing to update 1 thing.  so it is a pain copying and pasting rows, but that is the only way it works for me at this point.  im looking to find a way to import multiple images for one product without the exclude button checked…

 
Magento Community Magento Community
Magento Community
Magento Community
 
itchytrig
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2008-10-03
UK
 

Hi,

OK, I gave the following a try and it worked for me.

1 - Exported all products (don’t know how to limit the export to just the fields I want)
2 - Made the changes to just the fields/col’s I wanted too and deleted the rest; apart from:
- store
- websites
- attribute sets
- type
- sku (the identifier)
- then just the cols I wanted updated
3 - Re-imported this list and all seems fine

Just for the record. smile

Oh and one little Gripe for Varien: Downloaded the user manual / Guide for $20 and it does not cover ANY of this area in the publication at all? It is more of a Pre-Sales overview guide than anything, yes it does help in a number of cases, but to be honest it still leaves us with more questions, than answers as to the actual use of Magento as a whole? Would be good to see this updated soon.

 
Magento Community Magento Community
Magento Community
Magento Community
 
harshadgoswami
Jr. Member
 
Total Posts:  3
Joined:  2009-06-14
 

thanks it solved my problem

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 4