Paul Reading Posted April 16, 2009 Share Posted April 16, 2009 When you do a CSV upload what is the primary key, is it the "Name". The reason is my unique supplier reference number is not user friendly and I would not want to map it to the "Name" as I would rather keep the name for a user friendly description. Link to comment Share on other sites More sharing options...
first1 Posted April 17, 2009 Share Posted April 17, 2009 It is a number 1,2,3,...reference and EAN13 are used for referencesthere is a supp ref too if you need that Link to comment Share on other sites More sharing options...
Paul Reading Posted April 17, 2009 Author Share Posted April 17, 2009 Let's say I have a csv with the following fields.:-IDActive (0/1)Name *Categories (x,y,z...)Price tax excl.Tax rateOn sale (0/1)Reference #Supplier reference #SupplierWeightQuantityShort descriptionDescriptionTags (x,y,z...)Meta-titleMeta-keywordsMeta-descriptionI want to re-upload because the "Name" and "Price tax excl." have changed. I will need to tie these changes with the products already in the database so that the details can be over written (I do not want to create duplicate products). I will need to include another field (primary key) are you saying that EAN13, Reference and Supplier Reference are all primary keys?If so:My Supplier has changed the box quantities of some products and issued a new Supplier Reference even though the product has not changed. Which two fields would I need to upload in order to change the supplier reference?I really need to know the hierarchy before I start uploading products otherwise I wil not be able to modify my database if I don't get the structure correct. Link to comment Share on other sites More sharing options...
first1 Posted April 17, 2009 Share Posted April 17, 2009 To be honest, the csv import is something for when you upload alot of products in the first time to fill in your shop and not to be used for little adjustments.Otherwise, you would need to change somtehing on the csv and import all again (click delete existing products during the import) and that will replace all the product with your new csv. but is it worth replacing all for a couple of changes?I suggest you dont use the csv for changes that you do.Ok another way to replace 2 of 3 products, is:Look for the IDs of the products that you want to replace. make sure the ID in the csv matches the ID of the products in your catalogue that you want to replace (how to find the product ID? in catalogues click on the category where the products are listed and you will see the ID field)So if you want to replace product ID# 35 in the catalogue for example, make sure that they product ID field in the csv is 35And during the import DO NOT delete the existing products.Again, i would say that product import through csv should be for mass import and not for little modifications.there is a module called masspdate, search for it and maybe you can tweak it to suit your need to update the products in an easy way.I hope this helped. Link to comment Share on other sites More sharing options...
Paul Reading Posted April 17, 2009 Author Share Posted April 17, 2009 Thanks for the explanation. I have a web site http://www.lampspecs.co.uk where we have over 4500 products and we drive it from csv files. When a supplier changes the prices we simply open the csv in excel and re-upload. It is a very simple process to update prices, I was hoping that I could update PrestaShop the same way.I find that the way Presta handles the positioning of products to be bizarre. Because you don't put in the path to the product otherwise it adds the products to several categories at once. The means I cannot have to categories with the same name and use csv. For examplehome/bulbs/Clear BChome/candles/Clear BCThere are two categories called "Clear BC" that are not related but in the csv the category can only be "Clear BC"Unless you know different. Link to comment Share on other sites More sharing options...
first1 Posted April 17, 2009 Share Posted April 17, 2009 You are wrong on this one.Again the category field in the csv is not the category name, it is the category idSo home/bulbs/Clear BC (cat ID 8 for example)home/candles/Clear BC (cat ID 23 for example)In the csv under category, you put 8,23this way it will appear in both categories.and when you create the categories, althought the might have the same names, they iwll have different IDs. so not a problemPrestashop is a clever system Link to comment Share on other sites More sharing options...
Paul Reading Posted April 17, 2009 Author Share Posted April 17, 2009 Oh that is great. So if I use Catogory ID's I can be certain the product will go in the right place - good.If I use product ID's won't that overwrite each time I upload the file; so for example, I have a new set of prices if I upload a csv with just three fields :-"Product ID" "Product Name" and "Pice excl. tax"Wouldn't that just update the sales prices but leave descriptions and images etc in place? Link to comment Share on other sites More sharing options...
first1 Posted April 18, 2009 Share Posted April 18, 2009 That you will need to try and play with it to see what it does.I have not tried that.have a god and let us know how it works. Link to comment Share on other sites More sharing options...
fkeuning Posted May 10, 2009 Share Posted May 10, 2009 Does anyone have a example csv-file? I'm tryin to get it to import, but no luck yet. Category and manufacturors no problem. But product...no luck. Is there a manual somewhere which states what value you must fill the csv with? Like was said above that categorie is not the name, but the id. So if anyone has an example csv-file or a manual with the correct definitions...that would be great. Link to comment Share on other sites More sharing options...
Paul Reading Posted May 10, 2009 Author Share Posted May 10, 2009 I will send you one later. It is a horrid process but it is worth it because you can mass update your products at a later stage.Paul. Link to comment Share on other sites More sharing options...
fkeuning Posted May 11, 2009 Share Posted May 11, 2009 That would be great! I don't understand why there is no better solution to this yet. There are so many smart developers here. Why isn't there a script directly on the database istead of through the presta backend. I don't know how to make those scripts, but my brother in law said this weekend that if you have the model of the database with all the relations between the tables, then it's easy he said. I'll try to get him to make something like that.Maybe any of you guys at Presta have the model? You need just a part of it that concerns the relations around the products.Anyway...till then I hope whatever you (Paul) will send me will work for me as well as it does for you. The massupdate sounds perfect as well. That will save a lot of work! Link to comment Share on other sites More sharing options...
EarlMax Posted May 11, 2009 Share Posted May 11, 2009 i can't get the catergories imported any help here please ? Link to comment Share on other sites More sharing options...
desperado Posted May 18, 2010 Share Posted May 18, 2010 EarlMax, I did it with excel. Just search a bit more for how to. Just do not type any data in the ID fild cos PS does it by it self. If you want to add a sub cat , type the sub cat name to NAME and type the main category that sub cat belongs to to "Parent category".Ex: ID, Name , Parent category : , AUDI , : , A4 , AUDIThats all. Link to comment Share on other sites More sharing options...
EarlMax Posted May 19, 2010 Share Posted May 19, 2010 thanks , this was a year ago Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now