News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

One database 2 shops

Started by k2bmedia, July 18, 2017, 16:09:09 PM

Previous topic - Next topic

k2bmedia

Hello all,

I have a question.

I want to set up an 2nd virtuemart store with the same products like the first existing shop. I want to use CSVI to daily export the products and import it in the new shop (I think this is the most easy way).

But when a product is ordered on the 2nd shop, the stock must me adjusted to the first primary product database. I was thinking, I can also use CSVI to export the orders back to the first shop.

My questionl; Will the product stock value be updated when I export and import the orders back to the first shop?


I hope my question is clear to all, or maybe an complete other solution fits more my needs?


with kind regards
Dennis

K&K media production

I've done a similar thing with mysql replication and a custom php cronjob.

QuoteWill the product stock value be updated when I export and import the orders back to the first shop?

No, the stock is stored inside product table

k2bmedia

Quote from: K&K media production on July 18, 2017, 21:46:25 PM
I've done a similar thing with mysql replication and a custom php cronjob.

QuoteWill the product stock value be updated when I export and import the orders back to the first shop?

No, the stock is stored inside product table

Thank you for your reply, so updating the stock info from the 2nd shop to the 1th shop is not possible?

How did you manage the mysql replication?

K&K media production

QuoteThank you for your reply, so updating the stock info from the 2nd shop to the 1th shop is not possible?

It is possible, but you need a custom script to merge the stock of both shops and write it back to both databases.

QuoteHow did you manage the mysql replication?

https://dev.mysql.com/doc/refman/5.7/en/replication.html

I've a replication from the master server with shop 1 to the slave server with shop 2. On the slave server runs a custom script as cronjob which synchronised specific database tables.