hobbzilla Posted December 15, 2003 Share Posted December 15, 2003 This thread was created so that any and all support questions regarding my recent multi-store contribution can be asked & answered. 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! Quote Link to comment Share on other sites More sharing options...
thewitt Posted January 8, 2004 Share Posted January 8, 2004 Is the implementation plan then to copy all the files in catalog to a new directory and that then becomes the second store? 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 Quote Link to comment Share on other sites More sharing options...
thewitt Posted January 8, 2004 Share Posted January 8, 2004 Just another note. 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 Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 8, 2004 Author Share Posted January 8, 2004 Tim, 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 Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 8, 2004 Author Share Posted January 8, 2004 Okay I have release v1.1 of multi-stores You can download this version here temporarily. For some reason the upload into osCommerce's contributions section did not complete <_< I have already e-mailed Mark to update the file.. multi-stores_v1_1.zip Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 8, 2004 Author Share Posted January 8, 2004 Is the implementation plan then to copy all the files in catalog to a new directory and that then becomes the second store? 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). The implementation plan is to take stock 2.2MS2 and overwrite all files in the contribution. So now you have an updated catalog & updated admin. 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 Quote Link to comment Share on other sites More sharing options...
thewitt Posted January 8, 2004 Share Posted January 8, 2004 Thanks. I worked through it last night (till almost 4 this morning...) and was going to report the store image bug this morning too :). 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 Quote Link to comment Share on other sites More sharing options...
thewitt Posted January 9, 2004 Share Posted January 9, 2004 Just a note on implementation strategies. 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 Quote Link to comment Share on other sites More sharing options...
Serial Posted January 11, 2004 Share Posted January 11, 2004 Hi, 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. Quote Everything is possible. Link to comment Share on other sites More sharing options...
hobbzilla Posted January 12, 2004 Author Share Posted January 12, 2004 Step 1: Install Stock osC 2.2MS2 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. Quote Link to comment Share on other sites More sharing options...
Serial Posted January 13, 2004 Share Posted January 13, 2004 Hi hobbzilla, 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. Quote Everything is possible. Link to comment Share on other sites More sharing options...
monstrico Posted January 15, 2004 Share Posted January 15, 2004 Hi, 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. Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 15, 2004 Author Share Posted January 15, 2004 (edited) Serial: 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 January 15, 2004 by hobbzilla Quote Link to comment Share on other sites More sharing options...
monstrico Posted January 15, 2004 Share Posted January 15, 2004 I have a problem with the pic-uploading functionality: The pictures are all found as long as they are for articles in shop 1; but those article pics for shop 2 cannot be found by the shop2-user side. I have to move them by hand to the images folder of shop 2. Any advice would be great! Thanks! Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 16, 2004 Author Share Posted January 16, 2004 monstrico, 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. Quote Link to comment Share on other sites More sharing options...
monstrico Posted January 16, 2004 Share Posted January 16, 2004 I was thinking about moving the image folder outside the stores, so there would be only one image folder, and adjusting the path in the configure files. 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 Quote Link to comment Share on other sites More sharing options...
bleu Posted January 17, 2004 Share Posted January 17, 2004 Will this contribution allow separate pricing per store also? Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 17, 2004 Author Share Posted January 17, 2004 monstrico: 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! Quote Link to comment Share on other sites More sharing options...
bleu Posted January 17, 2004 Share Posted January 17, 2004 (edited) I just want to be sure I am clear on the functionality when I explain details to a client. 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 January 17, 2004 by bleu Quote Link to comment Share on other sites More sharing options...
Farrukh Posted January 17, 2004 Share Posted January 17, 2004 Hi hobbzilla 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. Quote Link to comment Share on other sites More sharing options...
F1Peace Posted January 18, 2004 Share Posted January 18, 2004 Hello, I can only display one of two shops on the main page, ie. mystore.com shows the products and categories for myshop.com/store1 in the Table configuration the STORE_ID is set to one in the Table configuration_store1 STORE_ID is also set to one. in the Table configuration_store2 STORE_ID is set to two. So therefore only the contents of configuration_store1 show up on the main page, unless I change the STORE_ID in the configuration Table. If I comment out the define->configuration in database_tables (/catalog) I get an error that that table can not be found. In database_tables.php (/catalog) I have defines set for all three configurations. In database_tables.php for each of the stores, I have defines set for only their respective configuration table. The respective stores work perfectly, with the exception of my main page. Any way to fix this without a complete reinstall? Quote Link to comment Share on other sites More sharing options...
monstrico Posted January 19, 2004 Share Posted January 19, 2004 I don?t know if this is a help for you, but I left the admin-folders in each of the catalog folders, adjusting the respective configure and database_table files, so that I finally have 3 (in your case) admin-sections. So I can assign a specific shop_ID to every store. By the way, I just realize that you have THREE stores, not 2. Your ..._store1 is already store 2. Also, in every catalog- and the catalog/admin-folder you need to readjust 2 more files, that are: database_table.php define('TABLE_CONFIGURATION', 'configuration'); to define('TABLE_CONFIGURATION', 'configuration_store1'); AND configure replace all occurencies of 'catalog' with 'catalog_store2' or whatever you called the folder where you put your second store into. Hope this helps. Quote Link to comment Share on other sites More sharing options...
monstrico Posted January 19, 2004 Share Posted January 19, 2004 Something else (sorry, I?m not an english speaker, so I?m slow): every database_table-file should only have ONE configuration-definition, not all 2 or 3 of them, other wise it will call the fist table the file found. So eliminate duplicate entries. And again: for each store leave the admin-folder in the catalog-folder and adjust the respective configure and database_tabel-files! Quote Link to comment Share on other sites More sharing options...
thewitt Posted January 19, 2004 Share Posted January 19, 2004 Manufacturers really need to be store specific. As I'm getting ready to take my split store live, one of the things that still glares out as missing are store specific manufacturers. I have roughly 100 manufacturers. 80 have products in Store 1. 20 have products in Store 2. I really do need to split them out. I think that the only place they need to be split is in the manufacturers pull-down, and then have an "assignment to store" option in the admin. -t Quote Link to comment Share on other sites More sharing options...
monstrico Posted January 19, 2004 Share Posted January 19, 2004 A part time solution - until the multistore system grows into something even better! (I?m still fascinated by this contrib!) - might be the Contib Categorical Manufacturers v1.1 http://www.oscommerce.com/community/contributions,1497 It shows only the manufacturers that have products in the actual category. Still not a perfect solution since there is no possibility to show all manufacurers of one store. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.