Zen Cart Logo
Forums / General Questions / Multiple Stores in one installation sharing one database

Multiple Stores in one installation sharing one database

Locked

Views: 6,951

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
1 Jul 2007, 10:08 PM
#1
bajanboost avatar

bajanboost

New Zenner

Join Date:
Dec 2006
Posts:
21
Plugin Contributions:
0

Multiple Stores in one installation sharing one database

Greetings All,
I have a friend that has several store branches throughout the world. A franchise to be exact. He wants on e-commerce solution where he can have a shared database of his products, but depending on the country the user/client selects from a drop down menu on the main header, they get a different price per product.

For Example:
Herbal Tea is sold in the USA at $5 a bag, but it is sold in Europe for $6 a bag.

He would like to add countries based on the location of his franchises and then add prices to his products based on the country. Products are automatically shared to every country, but are not added to that country's product list until a price is added.

Is there a solution for this? Is anyone willing to develop such a solution, and if so, what would something like this cost me?

1 Jul 2007, 10:19 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Multiple Stores in one installation sharing one database

What you describe is quite doable. Zen Cart's price functions are isolated in a single file. You'd just need to tweak them to read different data from the database based on the criteria that you describe.

Depending upon your client's business processes, I suspect that multiple prices won't actually be the big job. There will probably be more work involved in creating the infrastructure to support adding new branches, locations and price bands and maintaining the pricing data that will be used for each of them.

To get a price for this you should post in the commercial help wanted section of this forum. I would recommend ensuring that you make contact with somebody who has good requirements analysis skills, to avoid nasty surprises later on. This is one of those changes where it will be easy to miss something key and get into an argument about who should have spotted it.

1 Jul 2007, 10:26 PM
#3
bajanboost avatar

bajanboost

New Zenner

Join Date:
Dec 2006
Posts:
21
Plugin Contributions:
0

Re: Multiple Stores in one installation sharing one database

kuroi:

What you describe is quite doable. Zen Cart's price functions are isolated in a single file. You'd just need to tweak them to read different data from the database based on the criteria that you describe.

Depending upon your client's business processes, I suspect that multiple prices won't actually be the big job. There will probably be more work involved in creating the infrastructure to support adding new branches, locations and price bands and maintaining the pricing data that will be used for each of them.

To get a price for this you should post in the commercial help wanted section of this forum. I would recommend ensuring that you make contact with somebody who has good requirements analysis skills, to avoid nasty surprises later on. This is one of those changes where it will be easy to miss something key and get into an argument about who should have spotted it.

I know somewhat a bit of programming, so I have a pretty good idea of what needs to be done. However, I don't think it would be very complex, but I just don't have the time or patience to deal with something like this.

The client will have one set of products and brands. They will be shared by ALL the stores. Some stores may or may not carry that a product, but they will surely share the same brands.
The branches in the country will all have the same price, it is the country itself that would have a different price.
The price would be dependent on the country and based on the client's selection of country, a different set of prices will display.

2 Jul 2007, 9:28 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Multiple Stores in one installation sharing one database

bajanboost:

I know somewhat a bit of programming, so I have a pretty good idea of what needs to be done. However, I don't think it would be very complex, but I just don't have the time or patience to deal with something like this.LOL. That's exactly my point!

On the surface, the programming for this is relatively straightforward, but overall the problem has rather more dimensions that you have mentioned, which is why you really need somebody with system analysis skills to ensure that you capture all the facets which need addressing.

For example (and there will be others):

  1. What price will you display when you don't yet know the customer's location?
  2. How will you deal with a customer located within one price band, but who wants to take delivery in a different location?
  3. As you will need to amend the database the database to hold multiple prices (and possibly keep doing so each time a new location is added) how will you enter and maintain data for these fields about which Zen Cart knows nothing?
  4. Since this is a franchised operation, how will you track sales by branch or franchise?(These are rhetorical questions - no need to answer them here)
2 Jul 2007, 1:48 PM
#5
dogmatic69 avatar

dogmatic69

New Zenner

Join Date:
May 2006
Posts:
40
Plugin Contributions:
0

Re: Multiple Stores in one installation sharing one database

Hi,

I was also thinking of doing something simmilar... Not quiet the same...

I wanna use one database for to different stores. One store for products and one for services. is that posible somehow? any ideas on where one would start

thanks

2 Jul 2007, 1:57 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Multiple Stores in one installation sharing one database

2 dogmatic69

Tweaking Zen Cart's code to allow multiple store fronts from the same database is something that several people have done. There is also an add-on mod for this which I believe allows you to specify which categories are used by which store, which would allow you separate products from services.

25 Jul 2007, 9:28 AM
#7
dogmatic69 avatar

dogmatic69

New Zenner

Join Date:
May 2006
Posts:
40
Plugin Contributions:
0

Re: Multiple Stores in one installation sharing one database

thanks

will look into that add-on

17 Aug 2007, 5:27 AM
#8
craigbailey avatar

craigbailey

New Zenner

Join Date:
Aug 2007
Posts:
1
Plugin Contributions:
0

Re: Multiple Stores in one installation sharing one database

kuroi:

2 dogmatic69

Tweaking Zen Cart's code to allow multiple store fronts from the same database is something that several people have done. There is also an add-on mod for this which I believe allows you to specify which categories are used by which store, which would allow you separate products from services.

i am interested in doing this too.. is this something that a semi novice can do or does it require programming skills??

17 Aug 2007, 5:42 AM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Multiple Stores in one installation sharing one database

Look at the MultiSite Module and decide that for yourself.

17 Aug 2007, 5:47 AM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Multiple Stores in one installation sharing one database

craigbailey:

i am interested in doing this too.. is this something that a semi novice can do or does it require programming skills??Very definitely requires programming skills. The multisite add-in module recommended by gjh42 is fairly well put together and a better option than attempting this yourself.

19 Aug 2007, 11:18 AM
#11
fredw avatar

fredw

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: Multiple Stores in one installation sharing one database

I am confused now... what I like is what the thread-starter also wants.. different pricing per product for different countries...

Has somebody managed to do this and if yes, how ?

Thanks, Fred

19 Aug 2007, 2:16 PM
#12
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Multiple Stores in one installation sharing one database

@FredW

There are four main parts to this:

Firstly you would need to identify from which country your visitor comes. How you would do this would depend upon your preferred visitor interface. Examples might be automatically detecting it from the visitors IP address (requiring custom code) or a spash screen asking them (requiring custom code).

Secondly you would need to extend the products table in the database to hold the additional prices.

Thirdly you would need to create some method of maintaining those additional prices - probably by adapting the admin/products.php file.

Finally you would need to pull all this together by editing the functions in includes/functions/functions_prices.php which extract pricing information and prepare it for display on your site.

20 Aug 2007, 6:26 AM
#13
fredw avatar

fredw

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: Multiple Stores in one installation sharing one database

Thanks for the answer... think have to ask somebody to do that for me.. sounds pritty complicated.

20 Aug 2007, 8:25 AM
#14
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Multiple Stores in one installation sharing one database

This would need some basic understanding of databases and intermediate PHP skills.

27 Jun 2008, 8:49 PM
#15
eaxpdt avatar

eaxpdt

New Zenner

Join Date:
Mar 2008
Posts:
4
Plugin Contributions:
0

Re: Multiple Stores in one installation sharing one database

I'm in need of a solution and this thread seems to be most helpful. I work for a company that creates e-commerce sites for its clients as part of its service. We recently started using Zen cart and its been amazing so far. So, instead of creating a new install of zen cart every time we get a new client I wanted a module to enable multiple sites to share one products database. I downloaded the multi-site module but I don't quite get how to enable multiple sites once its installed, or how to add a site when necessary from the documentation provided. There is a link to the developers site but that not active anymore. Can anyone help out with this; I need better documentation. Thankx:cool:

9 Jul 2008, 3:49 PM
#16
point0fsale avatar

point0fsale

New Zenner

Join Date:
Feb 2005
Posts:
67
Plugin Contributions:
0

Re: Multiple Stores in one installation sharing one database

A module may work, but it is much easier and straight forward to just use one database and address the central database from different domains and or locations. Different currencies are just selected as if you had 1 installation. Change the config files to address the central database on each separate location.

  1. Install each separatedly
  2. Setup your templates
  3. Copy all of the images to each site (An alternative way is to copy the whole site to the new or second location etc).
  4. Change your config paths etc. Public and Admin.

Go

Remember that anything that resides in the central database, if changed, changes all the sites. Anything that doesn't can be customized individually.
:yes:

9 Jul 2008, 3:58 PM
#17
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Multiple Stores in one installation sharing one database

"Remember that anything that resides in the central database, if changed, changes all the sites."

This is why a mod is needed - several different shop owners trying to set up their shops would interfere with each other. A whole lot of information and settings live in the database.