Zen Cart Logo
Forums / General Questions / two stores on one db or two payment modules?

two stores on one db or two payment modules?

Locked

Views: 1,205

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
17 Nov 2008, 7:29 PM
#1
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

two stores on one db or two payment modules?

I am wondering how best to handle this;

We are starting to work with someone who will handle fulfillment of our products in their territory.

So they will keep stock, do the shipping and take the money when there is a sale from their area.
Otherwise we are both selling the same products, same pricing etc.

So, two ideas come to mind;

  1. Install a second secpay payment module and setup the zone so that when a customer from
    a certain area makes a purchase the payment goes through our partner's merchant account.
    The only problem then is that we still get all the order confirmations, so splitting out just some and
    forwarding them is an admin hassle.

Solution 2; Install a new zencart as a clone of the existing store and running on the SAME database.
Is this possible? If so are there any potential problems doing that?

(The beauty of this would be that all correspondence for those customers / sales could go to the person operating that territory
and it would be easy to setup different shipping options and the look of the store could be catered a bit to those customers etc.)

Many Thanks,
trillian

18 Nov 2008, 11:05 AM
#2
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

Re: two stores on one db or two payment modules?

Anyone?

Basically, if two separate stores will run on the same database that is the best solution.

One store would have shipping and payment modules set to only one zone and would send
the order confirmations to the person handling those sales.

Thanks,
Sheryl

18 Nov 2008, 11:29 AM
#3
kuroi avatar

kuroi

Totally Zenned

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

Re: two stores on one db or two payment modules?

You can run two stores on the same database, but it's not an automatic solution to your problem.

Many of the things that you want to do differently are stored in the database. So you would not be default achieve the differences that you're looking for.

However, it can be made to work. You would need to install Zen Cart twice in the same database, but with two different database prefixes. Then tweak the includes/database_tables.php file for the second site to give the tables that should be shared the database prefix for the first site.

Clearly this would require a fairly high level of knowledge as to how Zen Cart works internally. There may also be some data that is inseparable. For example, if you wanted to share product information, you would also have to manage stock information, since they are managed in the same table.

18 Nov 2008, 12:49 PM
#4
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

Re: two stores on one db or two payment modules?

Thanks for the input.

The only things I want different in the second store are;

  1. having the order confirmations sent to a different email address
  2. having a different payment module
  3. having different settings in the shipping module

I would have thought this type of thing would be stored somewhere in
the zencart files (but I am a bit hazy as to how zencart works in that regard)

18 Nov 2008, 1:02 PM
#5
kuroi avatar

kuroi

Totally Zenned

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

Re: two stores on one db or two payment modules?

For just those, I would personally clone the payment and shipping modules, dig into the code to find the trigger points and switch them depending up the value of $_SERVER['HTTP_HOST'].

Although the changes would be fairly small, they would require a lot of testing and a high degree of technical knowledge about Zen Cart. If you have this already that's great, otherwise I'd recommend posting a request in the "Commercial Help Wanted" section of the forum.

18 Nov 2008, 2:50 PM
#6
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

Re: two stores on one db or two payment modules?

kuroi:

For just those, I would personally clone the payment and shipping modules, dig into the code to find the trigger points and switch them depending up the value of $_SERVER['HTTP_HOST'].

Although the changes would be fairly small, they would require a lot of testing and a high degree of technical knowledge about Zen Cart. If you have this already that's great, otherwise I'd recommend posting a request in the "Commercial Help Wanted" section of the forum.

Well, the shipping module is no biggie, in fact I can just create another table for that zone.

The payment module, shouldn't this simply be a matter of setting the zone for that payment type?

We are using secpay and the new one would also be secpay but I thought perhaps I could just name
it secpay2 or whatever and then set the zone on that module to just a certain area.

To my way of thinking this is a simple problem being made more complicated than it should be.

18 Nov 2008, 3:01 PM
#7
chris32882 avatar

chris32882

Zen Follower

Join Date:
Oct 2008
Location:
Hornell, NY
Posts:
330
Plugin Contributions:
0

Re: two stores on one db or two payment modules?

trillian:

Well, the shipping module is no biggie, in fact I can just create another table for that zone.

The payment module, shouldn't this simply be a matter of setting the zone for that payment type?

We are using secpay and the new one would also be secpay but I thought perhaps I could just name
it secpay2 or whatever and then set the zone on that module to just a certain area.

To my way of thinking this is a simple problem being made more complicated than it should be.

IT is complicated, have to have a lot of knowledge about coding, PHP..etc. Id do a post for help in Commerical Help forum.

18 Nov 2008, 3:10 PM
#8
kuroi avatar

kuroi

Totally Zenned

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

Re: two stores on one db or two payment modules?

Provided zones can be defined and are mutually exclusive, then that simplifies the payment and shipping, but mostly because you're using table rates for shipping. You'll still need to clone the secPay module, which isn't one of the best to start with.

Conversely, this may make splitting the confirmation emails more difficult - I'm sure its doable, but you'll need to plough through the order.php class (the one in the catalog, not the one in admin) and see whether that knows, and can therefore use, the zone. Otherwise it may be necessary to work it out again.