Jump to content

How to duplicate store with fresh database product, order, member, etc


viemonsta

Recommended Posts

Hi, there is anybody know what is the best way to duplicate store to another domain name with fresh database in prestashop 1.4.x? i'm still using prestashop 1.4.10 now because i still need some module in this version to running store fit to my country (indonesia) e.g shipping, etc.

 

usually i use this SQL query to duplicate the store i was create before to create a new store in a new domain name:

 

TRUNCATE TABLE `ps_customer`;
TRUNCATE TABLE `ps_customer_group`
TRUNCATE TABLE `ps_address`;
TRUNCATE TABLE `ps_orders`;
TRUNCATE TABLE `ps_order_detail`;
TRUNCATE TABLE `ps_order_discount`;
TRUNCATE TABLE `ps_order_history`;
TRUNCATE TABLE `ps_message`;
TRUNCATE TABLE `ps_cart`;
TRUNCATE TABLE `ps_cart_product`;
TRUNCATE TABLE `ps_cart_discount`;

 

But this query just reset all member, order and cart ID. And when a new member created with ID 1 and place order let say order ID 1, source history from old database still showing in order ID 1 page in the BO, i think it's come from ps_connections table.

 

Do anyone here can share what is the best way to reset all database (like product, member, order, cart, etc) when i must duplicate a store to a new store in a new domain without reset another setting like currency, shipping, module, position and another general setting?

 

And my another question, it is safe to truncate ps_connections, ps_connections_page and ps_connections_source?

 

Thanks for your advice and sorry for my bad english language :)

Link to comment
Share on other sites

Is it an idea to let PS self take care of what record need to be deleted, by deleting the items through the back office self, instead of hacking the database? For example when you delete the products through BO, PS should delete all direct connections to the products as well, like links to their categories (category_product_link table)?

 

It may be that you have to delete in the right order to make it work, but give it a try?

 

 

My 2 cents,

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