Jump to content

Can you import old csv product data into prestashop and not use the prestashop SQL format?


MGTpresta

Recommended Posts

Hi,

 

  I have an old custom built SQL table for our products from before which is linked to our website built from scratch.  However, a large problem is that the table for our products from the old SQL table is radically different from prestashops SQL data table.  I know I can pull out the product title and description from the old SQL table but prestashop asks for many different things and much of our old SQL table would be dropped.  Essentially what I'm asking is would we have to then manually rewrite pretty much the whole SQL database in/for prestashop as there are many more different things to fill out (i.e a 0 or 1 to indicate the product is available, tax rules, UPC, dimensions, etc).

 

Thanks!

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

Hi MGT,

Many fields, like tax rules, product 'active' or not, are most probably all the same for all products. It depends a little on your old product fields available what you can copy and what you have to 'create'.

So what I would do is Export the old SQL/table to CSV, import in Excel or so, add the missing fields (Excel is pretty easy in adding all standard fields for a full column, like a full column of 1's for 'active' etc.)

 

When importing the olds table fields, you can maybe do the first rough filtering. Then, after adding the missing  values, when importing in PrestaShop, you can match all needed fields with their field in the CSV file.

 

Not all fields are needed to fill, like metadata, (long) description.

 

Can you describe a little the current fields in your table, then we can see what is required to add to it, before importing.

 

My 2 cents,

pascal

Link to comment
Share on other sites

Hi MGT,

Many fields, like tax rules, product 'active' or not, are most probably all the same for all products. It depends a little on your old product fields available what you can copy and what you have to 'create'.

So what I would do is Export the old SQL/table to CSV, import in Excel or so, add the missing fields (Excel is pretty easy in adding all standard fields for a full column, like a full column of 1's for 'active' etc.)

 

When importing the olds table fields, you can maybe do the first rough filtering. Then, after adding the missing  values, when importing in PrestaShop, you can match all needed fields with their field in the CSV file.

 

Not all fields are needed to fill, like metadata, (long) description.

 

Can you describe a little the current fields in your table, then we can see what is required to add to it, before importing.

 

My 2 cents,

pascal

Thanks for the advice Pascal.  Unfortunately, this is just as I thought.  Our old SQL is very different from prestashops so we will have to create the fields and a new table with new data entries through excel or SQL.  However since different typing is needed from product to product to 'create' these new fields we might as well just do it through prestashop.  I know the 1 or 0 is easy to change but the rest not so much as all we can use is just the product title and description.

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

what does your old sql look like? seems to me you should be able to use more than just the title and description; isn't the price in your old sql, for example? 
do you have a sample of your old sql you could post up? a demo line or something?

Link to comment
Share on other sites

what does your old sql look like? seems to me you should be able to use more than just the title and description; isn't the price in your old sql, for example? 

do you have a sample of your old sql you could post up? a demo line or something?

yes price is also there but as I said that's about it.  There are other categories but overall it is different from prestashop's database

Link to comment
Share on other sites

when you import a csv into prestashop you can change around what column is what, and even ignore columns that prestashop doesn't use. i'm having a hard time imagining what your old database could have that ps doesn't; i would be interested in seeing an example.

Link to comment
Share on other sites

when you import a csv into prestashop you can change around what column is what, and even ignore columns that prestashop doesn't use. i'm having a hard time imagining what your old database could have that ps doesn't; i would be interested in seeing an example.

Thanks for the tip.  However I do know that prestashop is very particular about its uploads, so much so that the sample they give to upload doesn't work unless you change quite a few parameters to match it better.  It isn't so much that our database has columns prestashop doesn't have but more so the other way around as I had mentioned earlier.  Hence why Pascal said you have to 'create' the missing fields.

Link to comment
Share on other sites

Problem is that we now talk a long time about some 'theoretical' database, and still don't know which fields your table has exactly, which we can try to match. If your database has most common fields, like name, description, price, maybe link to image or so, then we can come a long way, as many of the others are "defaulted" to their respective values, like default of 'active' = 1, so we don't have to add this column to our import csv file, if all products are active indeed (because they will be active already by default). As said before, some basic info like tax rate is most probably the same for all products, so that is a copy/paste of one field value in the full column,an easy job in Excel/other spreadsheet.

 

To stop further long discussions, an example of your table with some descriptive column titles would be the way to go now and then we can discuss the concrete steps to take. 

 

My $0.02

pascal.

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...