0

Let's suppose that I will create an e-commerce for a restaurant chain that has several restaurants and in each restaurant the menu is a little different. The user will enter the website and input its zip code. Based on the zip code he will be redirected to the nearest restaurant menu.

How can I create multiple stores or websites in which each will have its own database?

The higher purpose of this is: speed (one database for the several restaurants would be slow) and sync (I need to figure some way to sync the products on the restaurant with Magento's database. To make sure that users can't buy something that is out of stock.)

The solution that I've thought is to have the homepage in one server and several other servers with one Magento installation for each restaurant. But this would be insane.

A similar question has been asked. But the answers were confusing and nonconclusive.

New contributor
Antonio Araujo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1

Are separate store views, one for each restaurant, not what you want? See All Stores Documentation. In this instance, I would suggest you use a single instance of Magento with either separate store views or separate stores. This way all your stores can share a single product catalog but present each item differently (different price, content, imagery, etc.).

I don't believe you can shard the database like that (by store). I know you in Commerce edition you can shard the database to separate out the commerce tables from the content tables from the OMS tables, see Split Database Performance Solution.

Another option you have is to run Magento headless. You can set Magento up with as many store views or stores as you need, then run any CMS you want (Drupal, Wordpress, Typo3) or a custom HTML site, and power the menu from data from the Magento API. You would still have the limitation of one database and one Magento instance, but you'd have more control over the entire look and feel of everything instead of being constrained by Magento's layout and what not.

0

It's not possible with out of the box Magento, to implement something like this would require heavy core logic customization, which could lead into unforseen and hard to predict consequences.

Also it highly depends on the number of products and webstores(restaurants) you would have to sustain, and would all the products be unique per webstore. Maybe default magento approach with shared catalog would work for you

Your Answer

Antonio Araujo is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.