Jump to content
thirty bees forum

Recommended Posts

Posted

Yes it's possible. At least I think so. I have started this project (for my company), but not totally finished it. In general I looked for all db tables with id_shop or similair columns. Then I wrote some helper functions, how to merge them. Cause sometimes you want to hold the information, sometimes just delete it.

Example:

  • ps_orders you surely want to hold, so you just rewrite the id_shop from 2 to 1
  • ps_product_lang you want to check, if the product was already existing in shop 1. If yes, you probably just want to delete the rows for shop 2, otherwise you probably want to rewrite 2 to 1.

All this worked fine for me. But honestly, I haven't finished the project yet. In my BO I still have the 3 shops. But not because I fear any issue. I just didn't have time to finish this project cleanly.

Maybe @datakick can shortly answer, if he sees any potential problem with my advise!?

Posted

As @wakabayashi wrote, it's somewhat simple to reduce multistore to a singlestore. You need to make sure that all db records are assigned with target shop first. Check all *_shop tables, and *_lang tables and that contains id_shop column, are associated. Once all records are associated, delete the source shop. There shouldn't be an issue.

List of related tables:

SELECT table_name 
FROM information_schema.tables t
WHERE table_schema = database() 
  AND (
  	(table_name like '%\_shop') OR 
  	(
  		table_name like '%\_lang' AND 
  		EXISTS (SELECT 1 FROM information_schema.`COLUMNS` c where c.TABLE_NAME = t.`TABLE_NAME` and c.`COLUMN_NAME` = 'id_shop')
  	)
  );

If you have two stores in separate installations (not multistore), then it would be much more complicated. You would have to probably use data export and import.

 

  • 2 months later...
Posted (edited)

I have just done this merge 3 into 1 thing. Seems to work fine ☺️ But be careful: this is advanced stuff. It's not very hard, but you need to know, what you are doing...

I noticed, that stock management is a bit tricky, if you used "share_stock" before 🫣  IMO what you have to do in stock_available table:

  • set id_shoup_group = 0
  • set id_shop = ID_OF_YOUR_SHOP (note: this can differ from 1)

Additional Edit:

  • you should also check ps_configuration table similair to stock_available table
Edited by wakabayashi
Posted

I took the easy way out. We manually added categories and products from that shop to the other one. At the same time we made a much overdue cleanup 

 

Thanks anyway

  • Like 1

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