Webshops for more sites

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
wizzard81
Forum Commoner
Posts: 66
Joined: Wed Jan 15, 2003 6:05 am
Location: Belgium
Contact:

Webshops for more sites

Post by wizzard81 »

Hello,

I need some advice. I have 1 company but soon i will have 3 different webshops (sites).

Because my invoicing for both sites is at place. Would it be smart to have the webshop at one place for both sites with a site_id in of keep it seperate?

So products, categories would have an site_id to recongnise for which site the products or categories are.

What would be the best way to don't have problems in the future?
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

It depends. :)

How much cross talk will the different webshops have?

Are the shops different "brands" over the same inventory for sales? Are the users/administratots the same people? Are both shops serving the same national/international community (ie different localization requirements?)

If the sires are relatively distinct, but only share invoicing, I'ld probably have one "central" database and one database per-shop. If your database allows schemas, I might try that approach as well.

Do you have strict invoice numbering requirements? (Ie consecutative numbers, no gaps, etc) If so are the invoice numbers shared between the two or distinct. If distinct, that's be another argument for completely seperating the two.

If you go down the central+per-shop path, one thing to be aware of is that it can be harder to update the live database structure as you'll have more databases to hit. And cross-database queries are always a pain, even if your database allows them -- this can push for the all-in-one model.

Separate DBs can also help to limit exposure in cases of certain intrusions, etc.
Post Reply