Jump to content

What Product Fields Are Required For Installing


Recommended Posts

I am not able to use the normal csv import feature because the data I importing from is in json format.  I have written a script to update the database with the product details but when I go into the back office it doesn't show the new products.

 

So I must be missing some field(s) that the program is looking for before the new data will be considered a product.  So please tell me what fields are the minimum that must be provided.

 

Thanks,

 

Link to comment
Share on other sites

Did you just export your db ? This is how a CSV export generally looks like. You can then use field mapping to achieve proper importing.

ID;Photo;Name;Reference;Category;Base price;Final price;Quantity;Status;
3;http://localhost/~ibrahim/prestashopv1.5.6.1/img/p/1/1.jpg;MacBook Air;demo_3;Laptops;1504.180602;1504.18;400;1;
6;http://localhost/~ibrahim/prestashopv1.5.6.1/img/p/1/3/13.jpg;Belkin Leather Folio for iPod nano - Black / Chocolate;demo_6;Accessories;25.041806;25.04;25;1;
1;http://localhost/~ibrahim/prestashopv1.5.6.1/img/p/1/5/15.jpg;iPod Nano;demo_1;iPods;124.581940;158.07;158;1;
4;http://localhost/~ibrahim/prestashopv1.5.6.1/img/p/6/6.jpg;MacBook;demo_4;Laptops;1170.568561;1170.57;75;1;
7;http://localhost/~ibrahim/prestashopv1.5.6.1/img/p/1/4/14.jpg;Shure SE210 Sound-Isolating Earphones for iPod and iPhone;demo_7;Accessories;124.581940;134.58;15;1;
2;http://localhost/~ibrahim/prestashopv1.5.6.1/img/p/2/3/23.jpg;iPod shuffle;demo_2;iPods;66.053500;66.05;120;1;
5;http://localhost/~ibrahim/prestashopv1.5.6.1/img/p/7/7.jpg;iPod touch;demo_5;iPods;241.638796;241.64;120;1;
Link to comment
Share on other sites

No, I didn't export the DB.  Actually, it came from another site that didn't use MySQL that's why it was in json.  Ibndawood, thanks for specifically answering in the link you provided if fields are left out that will help tremendously. 

 

Prestamax, that looks like a very good site.  Although, I came to the same conclusion and converted it to csv using http://www.json2csv.com/ I had to strip out some characters through regex but it looks like it will work.  I will report back if my import was successful.

 

Thanks,

Link to comment
Share on other sites

none of my import is working I am getting this error.

 

  1. Blood Stimulator TCM Conc. (30 caps) (ID: 10) cannot be saved
  2. Property Product->link_rewrite is empty
  3. HY-C TCM Conc. (30 caps) (ID: 11) cannot be saved
  4. Property Product->name is empty
  5. I

I didn't do anything with link_rewrite but I did map the name field.  Do you have any ideas?

 

On the import I ticked the following:

 

force all id's during import.

 

As I mentioned above, I have populated some tables already via php and I need to keep that data if at all possible.

 

Thanks,

 

Thanks,

Link to comment
Share on other sites

I noticed that even though I made all the columns in the order of the sample that when I upload the csv file it rearranges the column order. 

 

Here is a glimpse of the .csv file

 

ID,Active,Name,Categories,On Sale,Reference #,Available for Order,Product Available Date,Show Price
8,1,Blessed Thistle (100 caps),4,0,100-1,1,2013-12-04,1
9,1,Lung Support TCM Conc. (30 caps),4,0,1004-3,1,2013-12-04,1
10,1,Blood Stimulator TCM Conc. (30 caps),4,0,1005-9,1,2013-12-04,1
11,1,HY-C TCM Conc. (30 caps),4,0,1006-1,1,2013-12-04,1
12,1,IF-C TCM Conc. (30 caps),4,0,1007-2,1,2013-12-04,1
13,1,Liver Balance TCM Conc. (30 caps),4,0,1008-8,1,2013-12-04,1
14,1,Liver Cleanse Formula (100 caps),4,0,1010-3,1,2013-12-04,1
15,1,LIV-J (100 caps),4,0,1011-4,1,2013-12-04,1
16,1,KB-C TCM Conc. (30 caps),4,0,1016-0,1,2013-12-04,1

 

by the way, I am starting at id 8 because when I uipdated the tables I left the sample data intact.

 

Thanks,
 

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

thought my csv file may be incorrect so I changed it to this

 

id,Active (0/1),Name*,"Categories (x,y,z,...)",On sale (0/1),Reference #,"Available for order (0 = No, 1 = Yes)",Product available date,"Show price (0 = No, 1 = Yes)"
8,1,Blessed Thistle (100 caps),4,0,100-1,1,2013-12-04,1
9,1,Lung Support TCM Conc. (30 caps),4,0,1004-3,1,2013-12-04,1
10,1,Blood Stimulator TCM Conc. (30 caps),4,0,1005-9,1,2013-12-04,1
11,1,HY-C TCM Conc. (30 caps),4,0,1006-1,1,2013-12-04,1
12,1,IF-C TCM Conc. (30 caps),4,0,1007-2,1,2013-12-04,1
13,1,Liver Balance TCM Conc. (30 caps),4,0,1008-8,1,2013-12-04,1
14,1,Liver Cleanse Formula (100 caps),4,0,1010-3,1,2013-12-04,1
15,1,LIV-J (100 caps),4,0,1011-4,1,2013-12-04,1
16,1,KB-C TCM Conc. (30 caps),4,0,1016-0,1,2013-12-04,1
17,1,Nervous Fatigue TCM Conc. (30 caps),4,0,1017-1,1,2013-12-04,1
18,1,Anti-Gas TCM Conc. (30 caps),4,0,1018-9,1,2013-12-04,1
19,1,Pro-Pancreas (100 caps),4,0,1027-9,1,2013-12-04,1
20,1,PLS II (100 caps),4,0,1029-4,1,2013-12-04,1
 

By the way, the fields are now in the order they should be too.

Link to comment
Share on other sites

none of my import is working I am getting this error.

 

  1. Blood Stimulator TCM Conc. (30 caps) (ID: 10) cannot be saved
  2. Property Product->link_rewrite is empty
  3. HY-C TCM Conc. (30 caps) (ID: 11) cannot be saved
  4. Property Product->name is empty
  5. I

I didn't do anything with link_rewrite but I did map the name field.  Do you have any ideas?

 

On the import I ticked the following:

 

force all id's during import.

 

As I mentioned above, I have populated some tables already via php and I need to keep that data if at all possible.

 

Thanks,

 

Thanks,

 

You most likely forgot to skip the first line with the headings. When importing the csv you have the option to skip a certain number of lines (default is zero). Here you have to enter the number 1 in order to skip the headings otherwise you will get the error above. See screenshot:

 

post-280425-0-86457700-1386179168_thumb.png

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

I had one wrong and I changed it (see below) but it still gives the same errors

 

ID,Active (0/1),Name*,"Categories (x,y,z,...)",On sale (0/1),Reference #,"Available for order (0 = No, 1 = Yes)",Product available date,"Show price (0 = No, 1 = Yes)"
8,1,Blessed Thistle (100 caps),4,0,100-1,1,2013-12-04,1
9,1,Lung Support TCM Conc. (30 caps),4,0,1004-3,1,2013-12-04,1
10,1,Blood Stimulator TCM Conc. (30 caps),4,0,1005-9,1,2013-12-04,1
11,1,HY-C TCM Conc. (30 caps),4,0,1006-1,1,2013-12-04,1
12,1,IF-C TCM Conc. (30 caps),4,0,1007-2,1,2013-12-04,1
 

Link to comment
Share on other sites

For some reason Excel wanted to put some of the headings in quotes, so I changed that.  However, it still gave the same error.

 

ID,Active (0/1),Name*,Categories (x,y,z,...),On sale (0/1),Reference #,Available for order (0 = No, 1 = Yes),Product available date,Show price (0 = No, 1 = Yes)
8,1,Blessed Thistle (100 caps),Nature's Sunshine Products,0,100-1,1,2013-12-04,1
9,1,Lung Support TCM Conc. (30 caps),Nature's Sunshine Products,0,1004-3,1,2013-12-04,1
10,1,Blood Stimulator TCM Conc. (30 caps),Nature's Sunshine Products,0,1005-9,1,2013-12-04,1
11,1,HY-C TCM Conc. (30 caps),Nature's Sunshine Products,0,1006-1,1,2013-12-04,1
12,1,IF-C TCM Conc. (30 caps),Nature's Sunshine Products,0,1007-2,1,2013-12-04,1
13,1,Liver Balance TCM Conc. (30 caps),Nature's Sunshine Products,0,1008-8,1,2013-12-04,1
14,1,Liver Cleanse Formula (100 caps),Nature's Sunshine Products,0,1010-3,1,2013-12-04,1
 

Link to comment
Share on other sites

I would try using LibreOffice Calc instead of Excel. With LibreOffice you have much more control over your csv file.
http://www.libreoffice.org/

Just to give you an example (sorry, it's in German but I am sure you will see what I mean):
2013-12-04_1931.png

 

And when editing the fields you won't have a messed line but a nice looking table.

 

The problem is probably your apostrophe ' in the products name and you will have to choose " as text delimiter. Not sure if excel gives you the option but you will have them in libreoffice.

Edited by prestamax (see edit history)
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...