Mark Posted May 27, 2019 Posted May 27, 2019 Hello, I'd like to create multiple shops on the same domain, each with its own subdomain. I'd like to use one code base for all, with different databases for each shop. Has any tried this and have experiences they can share? Or would the codebase require considerable work before this is possible?
0 datakick Posted May 27, 2019 Posted May 27, 2019 Why not use multistore? Anyway, if you are really committed to this approach, you will need to edit /config/settings.inc.php and define database settings conditionally, based on current request url. Just note that there might be some corner cases when the thirtybees is not bootstrapped inside web context. For example, some cron tasks can be setup to run in php-cli environment.
0 Mark Posted May 27, 2019 Author Posted May 27, 2019 I could still use multistore, but these other shops would not be be my own...others would manage them and I would just monitor where necessary. Thanks, that doesn't sound too onerous at this point. I'll try that.
0 datakick Posted May 27, 2019 Posted May 27, 2019 5 minutes ago, Mark said: I could still use multistore, but these other shops would not be be my own...others would manage them and I would just monitor where necessary. Thanks, that doesn't sound too onerous at this point. I'll try that. Well, you will get into issues with store customizations. Same codebase means same modules. If owner of Store A deletes some module, other stores will be affected as well. The same applies to module upgrade, for example... Also, file assets will be problematic. For example, product images are stored using image database id inside directory /img/p/... When you have two databases, you will have file conflicts. When I think about this... you better don't do it... 1
0 Mark Posted May 27, 2019 Author Posted May 27, 2019 Right, I suspected it would get complex, thanks. I'll have to install the whole codebase with each database. I would be interested in an approximate quote on what it would take to modify the codebase to allow this situation, just with standard modules and no customisation that would need anything other than database entries, ie no codebase changes possible to subdomain users.
0 datakick Posted May 27, 2019 Posted May 27, 2019 Hard to tell. We would need to go over the filesystem and figure out what content is related to database entries or individual store instances, and what not. The investigation itself would take couple of hours, and the fix itself would require at least week of work.
0 Factor Posted June 6, 2019 Posted June 6, 2019 Sounds like you are really asking is TB Multi Tenant. I dont think it is built that way. The devs would know here is an old post https://www.prestashop.com/forums/topic/425429-multi-tenant-multistore/
Question
Mark
Hello,
I'd like to create multiple shops on the same domain, each with its own subdomain.
I'd like to use one code base for all, with different databases for each shop.
Has any tried this and have experiences they can share?
Or would the codebase require considerable work before this is possible?
7 answers to this question
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