Zen Cart Logo
Forums / General Questions / Multiple Zen Carts accessing one database

Multiple Zen Carts accessing one database

Locked

Views: 2,251

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
12 May 2006, 5:30 AM
#1
mdmerrell avatar

mdmerrell

New Zenner

Join Date:
Nov 2005
Posts:
14
Plugin Contributions:
0

Multiple Zen Carts accessing one database

I’m in the process of expanding my online business. I would like to know if it’s possible to have several Zen shopping carts accessing one central database. Or could I have one Zen shopping Cart and change the logo and template style depending on the domain.

12 May 2006, 8:47 AM
#2
kuroi avatar

kuroi

Totally Zenned

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

Re: Multiple Zen Carts accessing one database

mdmerrell:

I would like to know if it’s possible to have several Zen shopping carts accessing one central database.
This seems to be possible, even easy. My USP hosts my databases on a separate server to rest of my code, and Zen Cart knows about them because the database name and path are set in the configuration files. I can't think of any reason why several carts shouldn't be set up to point to the same database. This would of course mean that those features controlled through the Admin would be the same for all of them, and the template used for each site would need to have the same name, but otherwise this sounds relatively straightforward.

mdmerrell:

Could I have one Zen shopping Cart and change the logo and template style depending on the domain.
This also seems doable to me, but rather more complicated. The template directory name is held in the database, so to have multiple styles per shop you would need to do something like, 1. create a session variable with the template name for the domain through which the user entered the cart

  1. hack those places core code to that each time it reads template_dir from the database, you give it your session variable instead.Doable, but not necessarily recommended, as it would make upgrading more complex.
15 May 2006, 5:28 AM
#3
mdmerrell avatar

mdmerrell

New Zenner

Join Date:
Nov 2005
Posts:
14
Plugin Contributions:
0

Re: Multiple Zen Carts accessing one database

kuroi:

This seems to be possible, even easy. My USP hosts my databases on a separate server to rest of my code, and Zen Cart knows about them because the database name and path are set in the configuration files. I can't think of any reason why several carts shouldn't be set up to point to the same database. This would of course mean that those features controlled through the Admin would be the same for all of them, and the template used for each site would need to have the same name, but otherwise this sounds relatively straightforward.

This also seems doable to me, but rather more complicated. The template directory name is held in the database, so to have multiple styles per shop you would need to do something like, 1. >

  1. create a session variable with the template name for the domain through which the user entered the cart
  1. hack those places core code to that each time it reads template_dir from the database, you give it your session variable instead.

Doable, but not necessarily recommended, as it would make upgrading more complex.

Thanks for your reply; I'll take your advice on the template.