deepee Posted September 18, 2014 Share Posted September 18, 2014 (edited) Hi All I recently upgraded a 1.5 site to 1.6.0.9 I did the upgrade in a test environment and had replicated the database beforehand. After making changes to the layout and testing, I moved the test site to public_html and went live. All was good but it turns out the client neglected to tell me they had added some products to the orginal database just before I did the upgrade, so now of course they are missing. As the 1.5 site's database structure is different, I replicated the original site and database in a test environment and ran the upgrade again. So now my data is good again but I've lost all the many changes I made to the site's appearance before going live. My next thought is to export the product related sql fields and import them to the production site. I checked all the product related fields that were populated which are:- ps_product.sql ps_product_attribute_image.sql ps_product_download.sql ps_product_lang.sql ps_product_sale.sql ps_product_shop.sql However, after successfully importing them and checking my back office catalogue, I can see the extra products but my inventory count hasn't increased and the additional products have no images associated with them. Also the "quantity" column displays "--" (instead of either zero or 1) So it seems I need to import more than the above fields to complete the task. Can anyone tell me what other database fields I need to get it to work? Thanks! deepee Edited September 18, 2014 by deepee (see edit history) Link to comment Share on other sites More sharing options...
sooroos Posted September 18, 2014 Share Posted September 18, 2014 (edited) you could export your products from your old DB to a csv file and then import the csv into new one. also you have missed: ps_category_product ps_image ps_stock_available Edited September 18, 2014 by sooroos (see edit history) Link to comment Share on other sites More sharing options...
deepee Posted September 18, 2014 Author Share Posted September 18, 2014 Thanks, for your reply sooroos. I'm o.k. with importing these in sql format directly to the database. So these are the only other fields I would need to replace? Link to comment Share on other sites More sharing options...
sooroos Posted September 18, 2014 Share Posted September 18, 2014 i am not sure if these are the only tables, you should look for table dependencies in the DB. for example if you insert into ps_image you also need to insert into ps_image_lang, ps_image_shop. better look for table dependencies Link to comment Share on other sites More sharing options...
deepee Posted September 18, 2014 Author Share Posted September 18, 2014 Thanks, any idea as to how to check for these dependencies? It's starting to look like a much bigger job than I thought it would be. Link to comment Share on other sites More sharing options...
sooroos Posted September 18, 2014 Share Posted September 18, 2014 maybe this will help you a bit: take a look here: http://doc.prestashop.com/display/PS15/Fundamentals#Fundamentals-Databaseschema but as i said before, via CSV it is much more simplier Link to comment Share on other sites More sharing options...
deepee Posted September 18, 2014 Author Share Posted September 18, 2014 Thanks, yes I see what you mean. Anyone know an easy way to export product data with image links to csv from 1.6.0.9? Link to comment Share on other sites More sharing options...
sooroos Posted September 19, 2014 Share Posted September 19, 2014 this might help, the rest is easier http://www.prestashop.com/forums/topic/353557-tutorial-helpful-sql-queries/?do=findComment&comment=1777405 1 Link to comment Share on other sites More sharing options...
deepee Posted September 26, 2014 Author Share Posted September 26, 2014 Thanks for that sooroos. I ended up manually adding the products as there weren't too many of them. It would have been very difficult if there had been more. Prestashop really does need a native export feature built into it so I'm going to leave this topic unsolved. I have been grappling with many issues while trying to upgrade one site from 1.5 to 1.6. Sometimes I think it would be better to start with a new installation and import the products, customers, histories etc. Link to comment Share on other sites More sharing options...
Recommended Posts