Multi-Stores Multiple Shops Support
#1
Posted 15 December 2003, 22:32
To download this contribution please visit The osC Contribution Section.
I am very proud of this contribution and have put alot of work into it. I am looking for other people to test this contribution out. It installs easily over 2.2 MS2 (as I installed this contribution fresh over an MS2 install with no other contributions added).
Let me know what you think!
#2
Posted 08 January 2004, 02:33
I've been integrating just the pieces needed to have separate products in each store and keep the same customer base, shopping cart etc. It's going fine, but I thought I could use the same phsical store and simply switch products displayed in each category.
The problem I'm having at the moment is setting STORE_ID.
Since STORE_ID is stored in the STORES table along with the URL, why not set it from there by comparing the URL with the stores URL, also stored in the STORES table.
By removing the STORE_ID values from the CONFIGURATION table, you could then really use the same code base by simply creating a link to the catalog directory from store 2, rather than duplicating all the files - which makes maintenance a little more complex (change one file, copy to all the stores, etc).
Does this make any sense?
Am I missing something else here?
-t
#3
Posted 08 January 2004, 04:21
The contribution is missing:
catalog/specials.php
I've already upgraded mine, but my specials.php is already modified so I can't really apply the changes to the contribution yet.
I'll do so when I finish the whole thing if it's not been done yet.
-t
#4
Posted 08 January 2004, 05:29
Thanks for the heads up.
I will release v1.1 tonight. With the ability to include the special on a per store basis. Whereas the special will be applied to selected stores ONLY if that product is also enabled for that store.
There are a few other minor updates:
Updated Installation Instructions
Included specials for stores in catalog/specials.php //thanks to thewitt
Fixed bug in update.sql
Fixed bug where Store image wasn't displaying
#5
Posted 08 January 2004, 08:03
You can download this version here temporarily. For some reason the upload into osCommerce's contributions section did not complete
multi-stores_v1_1.zip
#6
Posted 08 January 2004, 08:16
thewitt, on Jan 7 2004, 08:33 PM, said:
I've been integrating just the pieces needed to have separate products in each store and keep the same customer base, shopping cart etc. It's going fine, but I thought I could use the same phsical store and simply switch products displayed in each category.
The problem I'm having at the moment is setting STORE_ID.
Since STORE_ID is stored in the STORES table along with the URL, why not set it from there by comparing the URL with the stores URL, also stored in the STORES table.
By removing the STORE_ID values from the CONFIGURATION table, you could then really use the same code base by simply creating a link to the catalog directory from store 2, rather than duplicating all the files - which makes maintenance a little more complex (change one file, copy to all the stores, etc).
Simply take the updated catalog and copy it. Move it to another domain account or rename it if you are planing on using it on the same server
for example if you are using this to accomplish a distributor separation such as http://domain.com/europe http://domain.com/usa
You set the STORE_ID in each stores configuration table (you can open catalog/install/oscommerce.sql and copy the all the INSTALL INTO configuration and modify configuration to europe_configuration, etc. etc.)
i.e. europe_configuration, usa_configuration
The STORE_ID is not stored in TABLE_STORES, it is stored in the configuration table for the store in question. This is important. This is what allows you to have different shipping/payment options for each store.
Also of note is that the stores_url is currently not being used for and is for future use.
This contribution doesn't solve the problem of multiple sites the maintenence that ensues. That is where the planned template system comes in.
HTH
#7
Posted 08 January 2004, 13:16
I have been integrating only pieces as you know, as I wand to have the same accounts and shopping carts. It's been working fine. I'm also doing the integration with SEC from Linda - which is really a great set of contributions - so I've had to manually install most of the fixes.
I'm playing with soft links (the ln -s command) in unix to see if I can reduce the number of files that I actually have to duplicate. It does not appear that I need many to change the pieces that need to be changed.
I appreciate your work. I think it would be nice to have the store selector on the actual product creation page though - I seem to keep forgetting to put the products in a store up front since it's an extra step outside the product creation process. Just a leaning curve I guess.
-t
#8
Posted 09 January 2004, 22:38
I have a split shop running now, using all the same program files except for a few files for language changes and look and feel. No duplication of files needed.
I have two shops:
http://myurl/proshop
http://myurl/clubmakers
These are simply directories at the top of my web heirarchy. I have a splash page outside that allows people to decide what shop they want to enter.
The files all live in "proshop" (the 'catalog' directory) except for those that needed specific changes for the "clubmakers" shop.
What I did was to use the unix "ln -s" command to LINK the files from the proshop directories to the clubmakers directories. Where I needed to mofify any one file, I then simply removed the link to that file and copied the original over to the clubmakers directory and edited it.
I did NOT use the configuration table in the database for "STORES_ID" either. I simply defined it in "configure.php" uniquely for each store.
It seems to be working very well so far.
It's only a partial implementation, and it's integrated with the SEC contribution. I've kept the same shopping cart common across both virtual stores, etc.
Thanks for your work. It was a great base to build on.
It would be nice to have an admin function that would show you any products that are not associated with a store. I've "lost" a few products so far during the definition stages by not assigning them to anything!
-t
#9
Posted 11 January 2004, 20:40
I would like to have a mall style multi stores which uses only one central database.
I have tried with hobbzilla's (Contribute) but I am having troubles with set it up. I am confused even though I followed his install.txt guide. This is what I have done so far:
- I created new configuration tables for each new store (ie: configuration_store1, configuration_store2,..)
- I added define('TABLE_CONFIGURATION_store1', 'configuration_store1'); in "database_tables.php" files for both Admin and Catalog directories.
- I set the unique Stores_ID number for each store in their configuration table.
It is still not working.
* Please help me. If you know how to make it work, please explain me step by step. I would appreciate you.
If this contribution is not work well, what else shall I do to have a mall style (multi stores) with one database control for OSC MS2?
If I have multiple catalog folders (same catalog files with different folder names) under my web root, what should I do to let them share the database?
Please help me out as much as you can.
Thank you.
#10
Posted 12 January 2004, 22:54
Step 2: Download Latest version of Multi-Stores Contribution
http://www.oscommerce.com/community/contributions,1730
Step 3: Unzip files and copy them over 2.2MS2 installation (both admin & catalog)
Step 4: Run the update.sql against the proper osC db.
Step 5: Go to /admin -> catalog -> stores -> "Insert" (enter info -- at least a name) continue until you are finished for each store.
-- YOU SHOULD NOW HAVE A SINGLE STORE (/catalog) WITH 0 products in it.
Step 6: Copy /catalog and rename it whatever you like however many times you like (1 for each store)
Step 7: Open /catalog/install/oscommerce.sql and copy all of the
INSERT INTO configuration statements and paste them into your favorite text editor.
Step 8: Do a search and replace for "INSERT INTO configuration" and replace with "INSERT INTO store2_configuration" (or naming them something of value "chuckstools_configuration".
Step9: Update the osC sql db with the modified INSERT statments. Repeat Step 8 & 9 for each store (*making sure to change # or name for each store)
Step10: Go to admin -> catalog and assign categories & products to the stores you desire.
Step11: Enjoy.
#11
Posted 13 January 2004, 06:31
Thank you for the guide. However, I still like to discuss with you to clear out some confusions as I have already done these steps per your install.txt file.
In order for me to perform the "INSERT INTO store2_configuration", I have to create the table "store2_configuration". Right? That's what I did.
I created two stores (store1 and store2). I was able to "go to admin -> catalog and assign categories & products to the stores I desire" but it only worked for the store1.
Have you ever tried set up it for yourself? I would like to know. You idea and work are great. I really want to have it.
Would you want me to re-do it again and see? If you advise so, I will do it again. Please let me know.
I would like to enjoy it.
Thank you so much.
#12
Posted 15 January 2004, 12:18
I installed that fine contrib and it works fine. Just one thing is missing in the install file (at least I didn't see it during my night time sessions...), that is that you have to change the adequat line [cookie_path, catalogue etc] in the admin/includes/configure.php file, too.
In most cases this upper step is only necessary in whatever you call your "shop2"-setup, if you didnīt change anything in the main shop (which would be shop1).
Hope this is of some help.
#13
Posted 15 January 2004, 14:32
I'm sorry that you are experiencing difficulties.
Yes, I created the steps outlined in this support topic by doing a fresh install myself to clear up any confusion.
If you are having trouble with inserting the STORE_ID into the configuration_store2 table, then you skipped step 7 where you created the configuration_store# tables by utilizing a text editor doing a search and replace on the section of the install/oscommerce.sql file. Yes perhaps it wasn't explicitly defined that you would need to first create that table. I just took that for granted. I have updated my installation instructions.
Also, did you modify your store_2's /includes/configure.php after copying & renaming the updated catalog?
If you have everything working for 1 store the only thing left to have it work for 2 is to make sure that you have a 2nd table for configuration for store_2 with the new STORE_ID record (set to a valid stores_id) and copy the installation of store_1 for store_# updating the includes/database_tables.php & configure.php files. That should be it!
Edited by hobbzilla, 15 January 2004, 14:33.
#14
Posted 15 January 2004, 21:46
Any advice would be great!
Thanks!
#15
Posted 16 January 2004, 00:08
Because the admin is only really updating whatever site the configure.php in admin is set for.. it is not uploading the image into each shops images directory.. this is a problem. Other than just copying them over, I could only think of using a LINK in linux.
#16
Posted 16 January 2004, 01:34
But my tries didnīt work yet. So before going on with that, just let me know if this is a waste of time or not...
Another try was setting up a seperate admin fodler in each of the stores, but that get's confusing after a while... (what happens if you suddenly start to edit the files of another store? and I guess there will just be no way to hide on admin section from another...?)
Anyway: It is still one of the best contribs and Iīm having a lot of fun with it (this is not cynical!!!). Hope you are going to develpoe it even further!
Ciao, Robert
#17
Posted 17 January 2004, 07:31
#18
Posted 17 January 2004, 07:43
moving the image folder outside the stores would work (as long as they are still accessible and configured in the web server so that they are viewable.. - this is the basically the same thing as using the LINK ability with Linux... it is basically like a windows "shortcut" or alias if you aren't that familiar with it and works just like a regular path.
Also, next on the todo for this mod is to allow the ability to have one admin rule all stores with the ability to modify the configuration & modules, etc. for each store and to have another admin that can only see the info for that store (where you have distributors etc. and they need to see only their orders.
Bleu:
Yes, it will allow separate pricing per store via the specials module. But I don't think that is what you had in mind. You can't have the same product with a multiple tier pricing structure if that is what you are asking.. if that is the case you would need to create a separate product for each price. But like I said, now with v1.1 the specials feature should do you just fine!
#19
Posted 17 January 2004, 09:49
He wants 2 store names (URL's) and logo headers with one admin but call the same products at different prices per store.
The only way to do this is specify the products as specials and then that price will only show up in store 2 and remain at the original price in store 1?
Is that possible? They will be billed by a 3rd common URL to use the same merchant account and gateway (can be on the same server)
Thanks for your help.
Edited by bleu, 17 January 2004, 09:50.
#20
Posted 17 January 2004, 13:29
I would like to know if its possible to convert thie mod into a service with which we can provide different vendors the ability to sell on our sites.
Just like Amazon does it with the Marketplace.
We can assign them their own Control Panel through where they can setup their products.














