Jump to content
thirty bees forum
  • 0

Creating multiple shops, using one codebase, on the same domain


Mark

Question

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?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

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