Jump to content

How to import a .CSV file into Prestashop?


Recommended Posts

How does one import a .csv file into already built 'Category' menus? I'm using python to build a .csv script, but when I import it via Catalog-Products-Import, it does not load my items into my pre-built menu, but makes another one and loads the products there. So, I still have my pre-built top menu the same as before(with no items), but now in my sitemap, there's an additional link(which is populated with items), with the same name as my pre-built one. Anyone know how to either modify my .csv script or change the import process so that my items go into my pre-built menus, and not create a second menu? I tried to attach my .csv file and python script, but they are 'not allowed'

 

Thanks!!!

Link to comment
Share on other sites

Hey,

If you look on the right when you are on the csv import page, you will see the list of columns that prestashop is expecting to see in your csv file, from the top down. This list changes depending if you choose categories, products, combinations, etc.

In the category column, you should have the ID number associated with the category that you want. Look at your categories in the back office to see what the ID numbers are. Then your products will go to the correct place.

 

hope this helps

Edited by Buds (see edit history)
Link to comment
Share on other sites

Thanks for the swift response! Is the 'csv import page' the same as 'Advanced Parameters separator_breadcrumb.png CSV Import'?

This is where I go to import my csv file, but I don't see 'the list of columns that prestashop is expecting to see in your csv file, from the top down', on the left side. On the right side is-'Available fields' Am I in the wrong screen? I've tried importing .csv files with full path names for the category, partial path names(the lowest level sub-category), and the category ID, all 3 don't work correctly. Using the full path name does what I said in my first post, the other two attempts do nothing at all.

 

This is my .csv that partially works:11;1;At the Feet of the Master;Books/Collectible Antique Books;1.0;;;;;;;;;;;;;;;;1;At the Feet of the Master;;;;;;;;;http://www.popcultureheaven.com/Images/Books/Collectible Antique Books/At the Feet of the Master.JPG;;

 

This is the .csv with just the lowest level sub-category:11;1;At the Feet of the Master;Collectible Antique Books;1.0;;;;;;;;;;;;;;;;1;At the Feet of the Master;;;;;;;;;http://www.popcultureheaven.com/Images/Books/Collectible Antique Books/At the Feet of the Master.JPG;;

 

This is the csv with the category ID:11;1;At the Feet of the Master;458;1.0;;;;;;;;;;;;;;;;1;At the Feet of the Master;;;;;;;;;http://www.popcultureheaven.com/Images/Books/Collectible Antique Books/At the Feet of the Master.JPG;;

 

The last two gives this error:No Name (ID: 11;1;At the Feet of the Master;Collectible Antique Books;1.0;;;;;;;;;;;;;;;;1;At the Feet of the Master;;;;;;;;;http://www.popcultureheaven.com/Images/Books/Collectible Antique Books/At the Feet of the Master.JPG;;,,,,,,,,,) cannot be saved

Property Product->name is empty.

 

Somehow, modifying the csv file makes it not work at all. Maybe I'm modifying wrong?

Link to comment
Share on other sites

I am referring to the "available fields" window on the right of the csv import page. It is written as a list, but just picture it as columns... "ID" is the first column, "Active (0/1)" is the second column, etc.

 

To get your products into the pre-made categories, go to "Categories" in the back office and see what the category IDs are for each of your categories, and use that ID number in the 'category' column for each product (or set your own category IDs on your csv and erase all categories before import). If a product is in a sub-category, then use the ID for the sub-category.

 

If you type the actual name of the category instead of using the ID, PS will just create duplicate categories on import... same for combinations.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...