fab01.com Posted February 25, 2015 Share Posted February 25, 2015 (edited) Hi everybody,I am a newbie of prestashop and nowadays I am facing a problem with data migration ( products and related images ) from version 1.4 to version 1.6. Most of the modules for Data Exportation are not for free and I need to do this procedure only one time, so I was wondering which is the best way to achieve the goal by pure SQL and phpMyAdmin. I tried an exportation of data from the tables: attribute category product image specific_price ( I don't know whether include also stock or not ) but, after importing the dump into the Ps 1.6 db ( table fields are ok and no error from script execution ) I can't see any product into Product section... ( actually I also got an error if I check Categories, a Loop more precisely ). Thanks in advance for any help/suggestion! Edited February 25, 2015 by fab01.com (see edit history) Link to comment Share on other sites More sharing options...
Nutricao Posted February 25, 2015 Share Posted February 25, 2015 I have the same problem. I'd like to move my products with as much as possible information - I don't need everything) - to the different installation of a Prestashop. Can anyone help? It's weird that there is no tutorial for sucha a standard / common procedure out there. There are many solution but non of them works in 100%. Cheers! 1 Link to comment Share on other sites More sharing options...
fab01.com Posted February 26, 2015 Author Share Posted February 26, 2015 (edited) Hi Nutricao, seems I fixed the problem. The way is a bit tricky but I just give you some steps to follow in odred to achieve the goal: The tables you need to check ( differences on the fields ) on Presta Shop 1.4 are:the all attribute ( 5 tables ) the all category ( 4 tables ) the all products: ps_product ps_product_attachment ps_product_attribute ps_product_attribute_combination ps_product_attribute_image ps_product_country_tax ps_product_download ps_product_group_reduction_cache ps_product_lang ps_product_sale ps_product_tag the all specific_price ps_specific_price ps_specific_price_priority and the all Image ( 3 tables )There are several differences between table structures so, use some kind of analyzer if you have ( i did it by my self manually with two Terminals and mysql cli - show tables and describe table_name statements..... Insane! ). once you have this schema simply export the data set ( not the table structure ) and edit the sql file generated by phpMyAdmin to adapt to the new structure ( i did it manually once more!!! ). I was also in huge troubles because the previous developer, or I don't know who, created duplicated records into different tables ( there are several changes in primary keys on almost all tables... from INDEX to PRIMARY so if you have duplicated records you will have to face the same problems that I had... I really hope no with you! ) and made a massive mess with langauges id and id_product/id_category associations....... Horrifying!!!By the way, assuming you will not have all these problems and your previous shop was properly configured and maintained you just need to export the dataset and import into the new structure. Pay attention: ps_product.id_color_defaultfield has been removed so I advise you to recreate it temporary ( into the new product table ) before importing the dataset ps_product_download.date_deposit ps_product_download.physically_filename have been renamed respectively date_add and filename so keep in mind also this. For all the rest everything should be fine..Check also the languages id and, once you will have recreated the Category Treemap I think you will have to work around it just reorganising and reactivating the all categories. Final step, transfer the dataset from ps_product to ps_product_shop and copy your images into the img folder. Now you should have everything in place. And anyway it's really incredible that the Community of Prestashop did't come out with some kind of documetation to explain the differences and the steps ( or a pluging as well ) to migrate the db from previous versions to new ones!That's pretty a shame. Edited February 26, 2015 by fab01.com (see edit history) Link to comment Share on other sites More sharing options...
Nutricao Posted February 26, 2015 Share Posted February 26, 2015 Hi man! That's my bad, because I actually have a different problem. It's not even about different version of Presta but just another installation on the different computer Sorry for that. But the point stays the same - that's weird that nobody make a tutorial or plugin to migrate products... Cheers! Link to comment Share on other sites More sharing options...
fab01.com Posted February 26, 2015 Author Share Posted February 26, 2015 At least a plugin for free!Hope you will find your way mate! Link to comment Share on other sites More sharing options...
nhproject Posted February 26, 2015 Share Posted February 26, 2015 Hi!!You cannot export all catalog's tables from 1,4 to 1,6 directly, because 1.6 has some new columns and new relations.When we need to do any job like that, we install the old shop in a local machine (also you can use a new prestashop installation and replace this empty db by the 1.4 db that you have). After of this we make an upgrade by steps (1 -> to latest 1.4, 2 -> to latest 1.5 and 3 -> to latest 1.6).At this point we have a 1.6 database version with our products, now we can see (not use, just see) the psclean module code. This module has a table list to get only the catalog.Now we have the 1.6 database and the table list, just we have to export from our local system this tables and import them into the production shop.Advice: Make this only if the 1.4 shop is the same shop that 1.6 or you will get a big trouble with the ids. Link to comment Share on other sites More sharing options...
seb776 Posted February 27, 2015 Share Posted February 27, 2015 That's a pain. I've done it 2 times. You can use the 1 click upgrade module, then check everything, and write scripts to correct the datas. Start here : http://doc.prestashop.com/display/PS16/Updating+PrestaShop Have fun ! Link to comment Share on other sites More sharing options...
fab01.com Posted February 27, 2015 Author Share Posted February 27, 2015 (edited) Hi guys, thanks for your all replies! You are both right, seb and nhproj, the problem is that ( I apologize that I forgot to mention it ) the customer is not mine. The all sources sit on a Remote server and there are more ( much more... can't hestimate how much!! ) then 1Gb of files up there!! So, for me it's really crazy thing to download all sources on my local machine, and follow the 3 steps procedure suggested by nhproject.... This is the first problem. Second problem is that the previous installation is a terrible horrifying mess.... There are tons of duplicated rows in several tables ( ie. ps_category_product ) and the previous project is full with bugs, probably caused by some custom plugins written by different internal developers....The main problem is to make a data migration trying to remove these errors and trying to clean a little bit the dataset so it's not possible, in this specific case, to commend to a single standard plugin/module.. unfortunately @njproject Yes! I noticed the new columns and the new relations as well, infact I had to edit manually all of them.I have imported the all dataset ( categories, products, images, attributes, specific prices ) and worked around pure sql statements to align as much as possible datas to a standard configuration ( considering that the new installation has a multistore configuration while the old one was a single store.... another problem!!! ) removing as much as possible mistakes, errors, misprints. Blieve me! It was a crazy job!Now seems working but I noticed different new tables as well and it would be nice to understand if the tables I have already properly aligned are enough or not: ps_attribute ps_attribute_group ps_attribute_group_lang ps_attribute_lang ps_attribute_impact ps_category ps_category_group ps_category_lang ps_category_product ps_product ps_product_attachment ps_product_attribute ps_product_attribute_combination ps_product_attribute_image ps_product_country_tax ps_product_download ps_product_group_reduction_cache ps_product_lang ps_product_sale ps_product_tag ps_specific_price ps_specific_price_priority ps_image ps_image_lang ps_image_type and, finally ps_product_shop Thank you!!! Edited February 27, 2015 by fab01.com (see edit history) 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