Jump to content

Moving categories and products from one store to another


Recommended Posts

HI, I would like to move products, categories, attributes, pages (basically everything besides store info and customers) from one store to another.  I am familiar with Phpmyadmin, I just dont know how to do it.  I have the new shop setup with a new database, so I just need to copy the info over.

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

okay so copy database from your prestashop A and import it to your prestashop B

export tables connected to: products, categories, attributes

and import this exported file to your prestashop B

 

move also /img/ directory to your new prestashop B

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Thanks, I did finally get the products, categories, and attributes moved successfully.  The images, however, don't seem to be there, even though I did copy the /img folder.  I can work with that, though.  The biggest part is moved.  :)

Link to comment
Share on other sites

there are tables in the db related to images too, did you move those too?

 

Does anyone know where the product image URLs are stored in the database or files or anything?!?! I have searched like crazy - trying to get products from one store to another and cannot get images to show up - the closest I got was getting the images to show but now not on the correct products, I am assuming it is a discrepancy on the product ID or Category ID.. I am willing to manually edit the DB to correct the issue, but I can't find anything related to product images in the DB...

 

PLEASE HELP, Been down for 3 days now...

yes, you can, but you have to replace datas carefully

it's always worth to backup this db before any change to its structure / data

Does anyone know where the product image URLs are stored in the database or files or anything?!?! I have searched like crazy - trying to get products from one store to another and cannot get images to show up - the closest I got was getting the images to show but now not on the correct products, I am assuming it is a discrepancy on the product ID or Category ID.. I am willing to manually edit the DB to correct the issue, but I can't find anything related to product images in the DB...

 

PLEASE HELP, Been down for 3 days now...

Link to comment
Share on other sites

Does anyone know where the product image URLs are stored in the database or files or anything?!?! I have searched like crazy - trying to get products from one store to another and cannot get images to show up - the closest I got was getting the images to show but now not on the correct products, I am assuming it is a discrepancy on the product ID or Category ID.. I am willing to manually edit the DB to correct the issue, but I can't find anything related to product images in the DB...

 

PLEASE HELP, Been down for 3 days now...

Does anyone know where the product image URLs are stored in the database or files or anything?!?! I have searched like crazy - trying to get products from one store to another and cannot get images to show up - the closest I got was getting the images to show but now not on the correct products, I am assuming it is a discrepancy on the product ID or Category ID.. I am willing to manually edit the DB to correct the issue, but I can't find anything related to product images in the DB...

 

PLEASE HELP, Been down for 3 days now...

There is a folder in the cpanel, called /img, but you will not see the images all in one place, as they seem to be resized, etc.  So, I am not sure that there is a place that you will find all of your images in one place with their original names.  I am still trying to figure this out myself, though, so maybe someone else can shed some light on this.  I just wanted to offer what I have found at this point.  Sorry that you have been down for 3 days. I know how frustrating that can be. :)

ps_image

ps_image_lang

ps_iamge_shop

Thanks, sooroos!  I will check that out right now.

Link to comment
Share on other sites

That did the trick!  So, as a recap,...

 

Before you start, as Vekia stated above, make sure both Prestashop versions are the same.  Update one or both, if needed.

 

To move products, categories, attributes, and product images, you need to login to phpmyadmin in Cpanel, find your database that is connected to the store you want to move products FROM, choose to EXPORT (choose custom,) highlight all tables that have products, categories, attributes, images in them (ps_image, ps_category, ps_product in the beginning of the table...there are approximately 25 all together), choose to compress the files as a .zip, then select go.  Save it to your computer. 

 

Go into the new database that you want to bring these tables INTO, and drop all of those tables that are named the same as the ones you just copied in the first/ original database.  I didn't do this initially and got errors when trying to bring the new data in.  ** Don't drop tables if you already have products in the store.  Only do this if you have a new installation of Prestashop, or you will lose your existing products!! **  Here is a tutorial on how to drop tables. http://support.hostgator.com/articles/specialized-help/technical/phpmyadmin/how-to-drop-tables-from-a-database-in-phpmyadmin  Then, once they are dropped, you are going to want to add them in again with your saved info from the first database.  So, click on import and upload the file you had previously downloaded.

 

Then, go into the Cpanel and copy the /img folder and move that over to the new site.  You can also do this with FTP.

 

This may not be the easiest or correct way, but it was what i did.  The main thing to remember is to take your time and backup your database before touching it.  You can even do each thing, such as all the products first, then all the attributes, etc.  I moved everything from an existing store to a brand new, empty one.  If you are wanting to move products to an existing store, you wouldn't want to drop tables in the database, or else you would lose all of your existing products in that store, but this will work if there are no products in the new database yet.  Hope this might help someone!

 

Thanks to those who helped me along with this!

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

 you can also add new entries directly to database without dropping the existing one

1. import via csv in backend

2. mysql query

Thanks!  I will have to look into mysql query because I kept getting errors until I deleted the tables and it would be nice to be able to just add to a database, if you're adding to the number of products in a database, rather than starting with a fresh install.

Link to comment
Share on other sites

×
×
  • Create New...