Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Two stores with the same database?


muuseec

Recommended Posts

I was just wondering if anyone knows if it is possible to have two different stores on the net, and use the same mySQL database? (to know what?s in stock or not).

 

I am planning to set up two stores with similar content, but for different "audiences".

 

 

Anyone have any idea? :blink:

Information overload!

Link to comment
Share on other sites

I was just wondering if anyone knows if it is possible to have two different stores on the net, and use the same mySQL database? (to know what?s in stock or not).

 

I am planning to set up two stores with similar content, but for different "audiences".

Anyone have any idea?  :blink:

 

Yes, I am curious about this one as well. I have two sites, one of which will be selling a portion of what is available at one site (this site I hope to list as a "manufacturer"). It would kick buttocks if I could use the same database.

Link to comment
Share on other sites

  • 4 weeks later...

It is absolutely possible and has been done! We currently have a client with a total of 8oscommerce stores, all connected to the same mysql database. Easy enough done, especially if you have all sites on the same server.

 

Each store pulled from the same products and category tables, placed all of the orders into a central oscommerce admin, yet each product offered a differrent price based upon the store among other things. The main criteria we built this on was as follows:

 

1. Products: in dbase added store1_price, store2_price, etc and updated each store to pull those specific prices.

 

2. Customers: in this table we added new fields for each store. Like store1_status, store2_status, etc. In the login and registration confirmation pages coding changes were then made to only allow a person who registered at that same store to login. This ensured that a person who registered at store 1, could not automatically login at store 2...while avoiding them potentially seeing an error at store 2 that they were already registered.

 

3. Orders: On the orders table we added a order_storename field, which stored which store the order was from. We then adjusted the checkout_process.php page to also record the store name into the order. Then altering the /admin/categories.php page to pull this new column in so they could in essence admin orders from all stores at a central location.

 

There was allot more done, but instead of me boring you with specific details, if you have any questions on this, ask away!

Sincerely,

Bruce

 

19 contributions submitted

Link to comment
Share on other sites

Another quick note: we also added into the PRODUCTS table a field called storex_display for all stores. This allowed us to then change the product and category pages to only display the specific products for each store.

 

So if you had 100 products, but only wanted 20 of them to show in store 2, you could do that.

 

Another fix we did was create two new tables for each store to handle categories, since the owner of these stores wanted each store to also have different categories displayed.

 

STORE1_CATEGORIES

STORE1_CATEGORIES_DESCRIPTION

 

Then by simply updating the two /includes/database_tables.php pages, it automatically took care of this across entire website. :thumbsup:

Sincerely,

Bruce

 

19 contributions submitted

Link to comment
Share on other sites

Another quick note: we also added into the PRODUCTS table a field called storex_display for all stores. This allowed us to then change the product and category pages to only display the specific products for each store.

 

So if you had 100 products, but only wanted 20 of them to show in store 2, you could do that.

 

Another fix we did was create two new tables for each store to handle categories, since the owner of these stores wanted each store to also have different categories displayed.

 

STORE1_CATEGORIES

STORE1_CATEGORIES_DESCRIPTION

 

Then by simply updating the two /includes/database_tables.php pages, it automatically took care of this across entire website.  :thumbsup:

 

Wow, that all sounds absolutely fabulous and like exactly what I need! Alas, I do not think I know enough of coding to do it myself. (Not that I am code-illiterate, I'm just not code-adept.) Would you ever make a version of this for a contribution?

Link to comment
Share on other sites

Check out this contribution:

http://www.oscommerce.com/community/contri...rch,multi+store

 

I believe this will do most of what you're looking for.

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...