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 2
How to import products using CSV files
 
frostbytes
Sr. Member
 
Total Posts:  114
Joined:  2008-11-05
Edmonton, Alberta, Canada
 

Hi everyone,

I’m seeing a few posts from Magento newbies wondering how to get started with importing files using CSV files.  I started typing this reply in one of those threads before thinking that it might be most helpful to put this into a new thread.

This explains how I imported a few thousand items into 1.1.8.  I’m detailing the steps in a simplistic way in case it helps anyone else who’s getting started.  I don’t claim that this is the best way of importing products—just that this is what worked for me.

STEP 1:  CREATE A DUMMY CSV FILE TO USE AS A TEMPLATE

A.  Ensure that you have at least one product in the catalog.  (If not Catalog > Manage Products > Add Product.)
B.  Go to System > Import/Export > Profiles
C.  Click the “Export All Products” profile, set your preferences, and run the profile.

That will give you a template that you can populate with your own data.

STEP 2:  UPLOAD + PROCESS THE CSV

A.  Go to System > Import/Export > Profiles
B.  Click the “Import All Products” products.
C.  Click “Upload File” on the left menu, select your CSV, and “Save Profile”.  Wait for confirmation that your file was uploaded.
D.  Now click “Run Profile” on the left menu, select your CSV file from the drop down, and click “Run Profile In Popup”.

That should do it.

A few tips and comments:

1) To make it easy to identify which file you just uploaded, don’t use spaces in the CSV’s filename or the dropdown will start to clutter in a hurry.
2) I’ve found that I can also FTP CSV files to the server to avoid having to upload them via the Magento console.  Putting them into the /public_html/var/import folder made them available for processing in the profile dropdown.
3) I imported photos by FTPing the images to /public_html/media/import and in all three fields (e.g. thumbnail, small_image and image) in the CSV file, referring to just the filename with a forward slash in front.  (.e.g “/filename.jpg")

HTH.

[L]

 
Magento Community Magento Community
Magento Community
Magento Community
 
Enam
Jr. Member
 
Total Posts:  3
Joined:  2009-01-31
 
frostbytes - 13 February 2009 11:12 AM

Hi everyone,



STEP 1:  CREATE A DUMMY CSV FILE TO USE AS A TEMPLATE

A.  Ensure that you have at least one product in the catalog.  (If not Catalog > Manage Products > Add Product.)
B.  Go to System > Import/Export > Profiles
C.  Click the “Export All Products” profile, set your preferences, and run the profile.

That will give you a template that you can populate with your own data.

STEP 2:  UPLOAD + PROCESS THE CSV

A.  Go to System > Import/Export > Profiles
B.  Click the “Import All Products” products.
C.  Click “Upload File” on the left menu, select your CSV, and “Save Profile”.  Wait for confirmation that your file was uploaded.
D.  Now click “Run Profile” on the left menu, select your CSV file from the drop down, and click “Run Profile In Popup”.

Great Work Man.. Hope it will help the developers…

Now question is:  how can i upload CSV files with out using magento admin panel. I would like to parse csv file in my own script and want to add data to the magento database directly…

thanks,
enam

 
Magento Community Magento Community
Magento Community
Magento Community
 
CD Salmons
Jr. Member
 
Total Posts:  6
Joined:  2009-02-04
 

I have tried this several times, but I still do not have pictures or my “Custom Options”. I have been pulling my hair out for hours! Any idea’s?

 
Magento Community Magento Community
Magento Community
Magento Community
 
frostbytes
Sr. Member
 
Total Posts:  114
Joined:  2008-11-05
Edmonton, Alberta, Canada
 

Hi Enam,

Now question is:  how can i upload CSV files with out using magento admin panel.

See tip #2 in my post.

I would like to parse csv file in my own script and want to add data to the magento database directly…

That I don’t know (I’m new to Magento as well), though from what I’ve read in these forums other developers are doing it.  Hopefully someone more experienced can answer your question.

[L]

 
Magento Community Magento Community
Magento Community
Magento Community
 
frostbytes
Sr. Member
 
Total Posts:  114
Joined:  2008-11-05
Edmonton, Alberta, Canada
 

Hi CD Salmons,

I have tried this several times, but I still do not have pictures or my “Custom Options”. I have been pulling my hair out for hours! Any idea’s?

Regarding pictures, have you filled in all three photo-related columns?  Are you sure that you’ve uploaded the photos to right media/import folder (I believe there’s more than one) inside the root folder of your Magento installation?

What do you mean by “Custom Options”?  Do you mean attributes?

If you want, send me a few lines from your CSV file and I’ll see if anything stands.

[L]

 
Magento Community Magento Community
Magento Community
Magento Community
 
CD Salmons
Jr. Member
 
Total Posts:  6
Joined:  2009-02-04
 

@ frostbytes

Thanks for responding. The images are in the media/import folder. Image is in CSV as /image.jpg And for custom options, I am talking about the last tab under the product page that allows to input custom fields to capture data from the customer. IE Name, dates, or other information that the customer wants to include for their order. I have a personalization company, so people can customize their products on the site, I make them, then ship them. How do I send you the CSV? Please email me at and I can get it to you that way. Thank you for helping me. I am not going to give up on this damn thing, but I want to sometimes

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paulus
Guru
 
Total Posts:  335
Joined:  2008-07-21
 

@CD, we too have issues with the options, but i did read there was a bug saving these options in v 1.2.1. Not sure if adding lines to CSV copying options from other products works though. I desperately hope so as that would increase coolness of importing;-)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paulus
Guru
 
Total Posts:  335
Joined:  2008-07-21
 

Furthermore, we had no luck with the images either, we added them different ways:
/o/p/pic.jpg
/pic.jpg
pic.jpg

We added thos ein the image field, where we left image_label, small_image_label, thumbnail_label blank.

We did not upload any image anywhere, as these were standard coffeebean pics we already had there for another item. No luck though.

Frostbytes, see my error?

 
Magento Community Magento Community
Magento Community
Magento Community
 
frostbytes
Sr. Member
 
Total Posts:  114
Joined:  2008-11-05
Edmonton, Alberta, Canada
 

CD Salmons,

And for custom options, I am talking about the last tab under the product page that allows to input custom fields to capture data from the customer. IE Name, dates, or other information that the customer wants to include for their order.

Ah.  I don’t know.  I haven’t used those options.

How do I send you the CSV?

I replied to your PM.

[L]

 
Magento Community Magento Community
Magento Community
Magento Community
 
frostbytes
Sr. Member
 
Total Posts:  114
Joined:  2008-11-05
Edmonton, Alberta, Canada
 

Hi Paulus,

/pic.jpg

That’s what I’ve been using.

We added thos ein the image field, where we left image_label, small_image_label, thumbnail_label blank.

I specified the same image for all three columns.  The import process seems to take care of resizing.

We did not upload any image anywhere, as these were standard coffeebean pics we already had there for another item. No luck though.

Have you tried placing the image into the media/import folder to see if that works?

[L]

 
Magento Community Magento Community
Magento Community
Magento Community
 
reefnut
Member
 
Total Posts:  72
Joined:  2008-07-05
 

try this thread http://www.magentocommerce.com/boards/viewthread/31295/ for your image problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CD Salmons
Jr. Member
 
Total Posts:  6
Joined:  2009-02-04
 

@ Paulus
I am trying to import from my export file, so everything should be right. It is either a bug in Magento, or something server side. The only other thing I can think of is Excel not saving the file right. I have saved as CSV - Comma and as XPS 2003. The CSV imported everything but the pics and options, the Excel spredsheet would not import at all. If you find something out, please let me know

 
Magento Community Magento Community
Magento Community
Magento Community
 
frostbytes
Sr. Member
 
Total Posts:  114
Joined:  2008-11-05
Edmonton, Alberta, Canada
 

CD Salmons,

I received your sample CSV.  The first thing I see is that you haven’t put a forward slash in front of all your picture filenames.

[L]

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paulus
Guru
 
Total Posts:  335
Joined:  2008-07-21
 

Ok, the images had to be uploaded to the media/import folder and be referred to as /imagename.xxx

Now, if only that options duplicating/adding/updating bug/feature would work that’d be awesome.

 
Magento Community Magento Community
Magento Community
Magento Community
 
frostbytes
Sr. Member
 
Total Posts:  114
Joined:  2008-11-05
Edmonton, Alberta, Canada
 

Hi Paulus,

So pictures are working for you now?

Now, if only that options duplicating/adding/updating bug/feature would work that’d be awesome.

If you mean custom options, I haven’t tried using those yet.

[L]

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paulus
Guru
 
Total Posts:  335
Joined:  2008-07-21
 

Yes pics are fine.

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