Havouza Posted July 25 Posted July 25 Would it be theoretically possible to merge 2 shops into 1. If so, how?
wakabayashi Posted July 26 Posted July 26 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!?
Havouza Posted July 26 Author Posted July 26 Hi! How with all images? we have about 6000 in each shop. There is only unique products in each shop
datakick Posted July 26 Posted July 26 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.
Havouza Posted July 26 Author Posted July 26 We have 2 single shops. As I assumed it would not be practically possible. have to run 2. Thanks
wakabayashi Posted July 28 Posted July 28 Uh two different installations 🥵 I think it would be possible, but much more complicated.
wakabayashi Posted October 1 Posted October 1 (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 October 1 by wakabayashi
Havouza Posted October 1 Author Posted October 1 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 1
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