Jump to content
hobbzilla

Multi-Stores Multiple Shops Support

Recommended Posts

I have finally worked my way thourgh this contribute and am on the very last step:

 

Copy Installation Point for each store created

Copy ENTIRE installation directory (you can omit the admin if you'd like) to a new subdirectory, hosting account, server, country, planet, etc. (all you will require is access to the same mySQL database). For each copy you make you will need to correctly re-configure /includes/configure.php and includes/database_tables.php's TABLE_CONFIGURATION value (to the value specified in admin store creation). It should be possible to make one installation multi-store capable by using some clever if-else statements and adding a url argument (i.e. store_id=##) then modifying application_top to define which configuration table to use. I will wait until osCommerce utilizes templates before incorporating this functionality.

 

OR

 

Simplify M-S administration by using hard & soft links for duplicate files & images that reside on the same server.

 

 

Can anyone explain how to do this in more detail as if I make an exact copy of the store and then place this within the store folder with a different name (Store2) and remove the admin every change I make to store 1 shows in store 2.

Share this post


Link to post
Share on other sites

I have finally worked my way thourgh this contribute and am on the very last step:

 

Copy Installation Point for each store created

Copy ENTIRE installation directory (you can omit the admin if you'd like) to a new subdirectory, hosting account, server, country, planet, etc. (all you will require is access to the same mySQL database). For each copy you make you will need to correctly re-configure /includes/configure.php and includes/database_tables.php's TABLE_CONFIGURATION value (to the value specified in admin store creation). It should be possible to make one installation multi-store capable by using some clever if-else statements and adding a url argument (i.e. store_id=##) then modifying application_top to define which configuration table to use. I will wait until osCommerce utilizes templates before incorporating this functionality.

 

OR

 

Simplify M-S administration by using hard & soft links for duplicate files & images that reside on the same server.

 

 

Can anyone explain how to do this in more detail as if I make an exact copy of the store and then place this within the store folder with a different name (Store2) and remove the admin every change I make to store 1 shows in store 2.

Share this post


Link to post
Share on other sites

As I'm working on making all my changes to my store before the last step I'm currently trying to install easy populate to work with MS.

 

I'm currently trying to do the last few steps of updating the database to notice the changes but get the following error:

 

SQL query:

 

INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible )

VALUES (

 

'17', 'Easy Populate', 'Easy Populate', '17', '1'

);

 

 

MySQL said:

 

#1062 - Duplicate entry '17' for key 1

 

 

Does this have anything to do with this:

 

In the column for v_enabled_stores, you will need to separate the enabled Stores Name delimited by -- (i.e. My First Store--My Second Store). Spelling must be exact, if you have the wrong spelling a new store will not get created and the product will be enabled to a store with stores_id = 0, which doesn't exist.

 

If so how do I fix it?

Share this post


Link to post
Share on other sites

This looks like a great contribution :thumbsup: but before I get started with it here is my question: I have two sites on different servers, one with register_globals and one without , (don't ask long story.) Will this work in this situation? :huh: Both sites sell the same product but at different pricing and under different "companies", as well as selling product from a brick and mortar, and trying to keep all three up to date :blink: .

Share this post


Link to post
Share on other sites

Can anybody confirm whether the Easy Populate for Multi-Stores works with versions of Easy-Populate later than 2.79.

 

Thanks,

Share this post


Link to post
Share on other sites

Hi,

 

I am working for a client who needs 2 stores with one database. This Multi Stores contribution is exactly what is needed for this project. I have installed it on 2 demo stores. It worked perfectly... until I tried to ad Specials. Not being a trained programmer but rather a designer, I have not been able to solve this problem which comes with this error message:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'pd where p.products_id = pd.products_id and pd.language_id = '1' order by prod' at line 1

 

select p.products_id, pd.products_name, p.products_price from (products p, products_description) pd where p.products_id = pd.products_id and pd.language_id = '1' order by products_name

[TEP STOP]

 

I have been struggling with this problem for quite a while. I tried to find what I did wrong. I trashed everything and started again the whole demo project following the installation guide. I have also read almost all the posts on this board but have not found the answer.

 

One thing I would like to mention, and I don't know if it's important: for that demo, I have deleted all languages other than English, and also all the products and their attributes which came with OsCommerce. Again, everything is working perfectly and smoothly... except the Specials.

 

I would really appreciate if someone could help me on this.

 

In advance, thanks a lot!

 

 

Share this post


Link to post
Share on other sites

I forgot to mention in my previous post that the problem occurs ONLY when I click on the "New Products" button in the Specials page.

 

I re-installed the catalog with the contribution without deleting the demo products and specials. Everything works very well, except when I click on New Products in the Specials page...

 

Thanks!

Share this post


Link to post
Share on other sites

While I was waiting for help to come, I continued searching for the problem and found it. I will post it here, because it should help anybody who is using the Multi Store contribution and run into the same problem. (getting an SQL syntax error 1064 when adding a new product in Specials)

 

Location: catalog/admin/includes/function/general.php line 209

 

The parenthesis ")" before "pd" should be AFTER "pd".

 

Original code (highlighted in red):

 

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " ) pd " . ($admin_allowed_stores[0] == '*' ? " " : " LEFT JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id ") . "where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' " . ($admin_allowed_stores[0] == '*' ? " " : " and p2s.stores_id in(" . implode(',' , $admin_allowed_stores) . ") ") . "order by products_name");

 

Corrected code:

 

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd )" . ($admin_allowed_stores[0] == '*' ? " " : " LEFT JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id ") . "where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' " . ($admin_allowed_stores[0] == '*' ? " " : " and p2s.stores_id in(" . implode(',' , $admin_allowed_stores) . ") ") . "order by products_name");

 

I hope this will help and prevent others, who like myself don't know SQL, to go to bed after 3:00 am for 2 nights! However, I must say I learned a lot reading all the posts in this forum and that allowed me to find the little bug. :thumbsup:

Share this post


Link to post
Share on other sites

HI.. guys.. I need help Please

 

 

 

WELL I HAVE A STORE BUT FOR SOME REASON WHEN I GO TO ADMIN TO EDIT CATEGORIES TO ALLOW THEM BEEN ON THE

 

SPANISH SIDE IS NOT LETTING ME DO IT.

 

I PEOPLE ONLY SEE THE PRODOCTS ON THE ENGLISG SIDE (TROUGH THE ENGLAND FLAG) BUT WHEN MY CUSTOMER GO AND CLICK THE SPANISH FLAG THER IS NOTHING THERE.. ALTOUGH IT TRANSLATES THE OTHER BUTTOMS BUT THERE IS NO PRODUCTS...

 

 

PLEASE... ANY HELP ...?? IF SO. CAN YOU GUIDE ME PLEASE.

 

 

 

THANKS..

Share this post


Link to post
Share on other sites
HI.. guys.. I need help Please

WELL I HAVE A STORE BUT FOR SOME REASON WHEN I GO TO ADMIN TO EDIT CATEGORIES TO ALLOW THEM BEEN ON THE

 

SPANISH SIDE IS NOT LETTING ME DO IT.

 

I PEOPLE ONLY SEE THE PRODOCTS ON THE ENGLISG SIDE (TROUGH THE ENGLAND FLAG) BUT WHEN MY CUSTOMER GO AND CLICK THE SPANISH FLAG THER IS NOTHING THERE.. ALTOUGH IT TRANSLATES THE OTHER BUTTOMS BUT THERE IS NO PRODUCTS...

PLEASE... ANY HELP ...?? IF SO. CAN YOU GUIDE ME PLEASE.

THANKS..

 

 

The other languages must have been deleted...

Share this post


Link to post
Share on other sites

Dear all that have some experience with this Multi-Store... I am a bit lost...

I need some help!

Seems like a great contribution but I have some bugs ....

After working for 3 days to carefully merge the code, to my shop that has already a number of contributions integrated, I configured the admin according to the instructions.

I have selected the default store for the meantime and wanted to to see it alive.

Yet, when I try to open the default store on the correct URL, I get an empty page... nothing after a second of reading something.... even when trying to open the index.php file in that catalog-multistore folder, the same.....

I think that I have set up the correct paths in the admin and selected the default store...

I am missing something.... What can it be?

Any suggestions would be much appreciated!

Best,

Theodore

Edited by brahms2

Share this post


Link to post
Share on other sites
Dear all that have some experience with this Multi-Store... I am a bit lost...

I need some help!

Seems like a great contribution but I have some bugs ....

After working for 3 days to carefully merge the code, to my shop that has already a number of contributions integrated, I configured the admin according to the instructions.

I have selected the default store for the meantime and wanted to to see it alive.

Yet, when I try to open the default store on the correct URL, I get an empty page... nothing after a second of reading something.... even when trying to open the index.php file in that catalog-multistore folder, the same.....

I think that I have set up the correct paths in the admin and selected the default store...

I am missing something.... What can it be?

Any suggestions would be much appreciated!

Best,

Theodore

 

I'd make a quick suggestion to try out this. It's got heaps of packages and mods of osc pre-installed. I haven't tried it, but it promises to be pretty good.

 

www.oscmax.com

 

Cheers, Steve.

Share this post


Link to post
Share on other sites

Dear Steve,

 

Thanks... but not really sure what you are trying to say here... could you please elaborate?

 

Best,

Theodore

 

I'd make a quick suggestion to try out this. It's got heaps of packages and mods of osc pre-installed. I haven't tried it, but it promises to be pretty good.

 

www.oscmax.com

 

Cheers, Steve.

Edited by brahms2

Share this post


Link to post
Share on other sites

I wanted to know a little more about this contribution, but I don't really want to read 60 pages of forum dialog. Could someone please explain the main usefulness of this contrib?

I am looking for a contrib that will allow me to update the catelog, product descriptions, and attributes of 3 stores at once (the stores have the mostly same products). Will this do that?

If not, does anything do that?

Thanks, Matt

Share this post


Link to post
Share on other sites
I wanted to know a little more about this contribution, but I don't really want to read 60 pages of forum dialog. Could someone please explain the main usefulness of this contrib?

I am looking for a contrib that will allow me to update the catelog, product descriptions, and attributes of 3 stores at once (the stores have the mostly same products). Will this do that?

If not, does anything do that?

Thanks, Matt

 

Hi Matt,

This contribution allows you to set up one database that can feed several individual store websites. For instance... www.store1.com, www.store2.com, www.store3.com

 

Each store can be maintained from the admin screens of any of the websites linked to the database.

 

The main idea behind this contribution from what I have read and how I have used it is to allow multiple sites to access a central database of products. For instance store1 above carries handcrafted soaps only, store 2 carries jewelry only, however store three is a general gifts shop and sells both the soaps and jewelry.

 

With this contribution any change to an item will carry to that item description on all websites it is check boxed for.

 

A simple answer to your question is yes this contribution will do what you need as long as you follow the directions carefully.


Greg

Krynen.com - Interesting answers

Purple Dragon Gifts - Jewelry and other gifts

Purple Dragon Traders - Beads and Supplies

Share this post


Link to post
Share on other sites

Hello,

 

My multi store seems to be working just fine now after a few tries all of the contributions are playing nicely. However, emails sent from orders.php on the admin side seem to pe entering the config data from the main store rather than the store through which the order was placed. I assume I am missing something somewhere on this one page as the rest of the site is pulling correct store data. Any ideas? I imagine this is super easy, but for some reason I just cannot pin it down. (a little sleep might help)

Share this post


Link to post
Share on other sites

I have just installed this great contrib

 

But when I goto ADMIN and give the user/pass : admin/admin, it is NOT letting me in

 

does it have anything to do with REGISTER GLOBALS ?

 

Venk

Share this post


Link to post
Share on other sites

Finally...

 

For any one who has the same problem change the

 

 

 

define('DIR_WS_ADMIN', '/admin/');

 

 

in /admin/includes/configure.php to below;

 

 

 

define('DIR_WS_ADMIN', '/catalog/admin/');

Share this post


Link to post
Share on other sites

Is there anyway to easily add what store a product is linked to on the main screen? I.E my client has thousands of products, and it would be alot easier if when viewing all of the products you could see what product was linked to what store like it has status listed in the view.

Share this post


Link to post
Share on other sites
Is there anyway to easily add what store a product is linked to on the main screen? I.E my client has thousands of products, and it would be alot easier if when viewing all of the products you could see what product was linked to what store like it has status listed in the view.

 

 

i figured it out ;)

 

right after

 

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?>

 

I put

 

<td class="dataTableContent"><?php  

       $stores_query_raw = "select stores_id, stores_name from " . TABLE_STORES . ($admin_allowed_stores[0] == '*' ? " " : " where stores_id in(" . implode(',' , $admin_allowed_stores) . ") ") . "order by stores_id";
       $stores_query = tep_db_query($stores_query_raw);

       while ($stores = tep_db_fetch_array($stores_query)) {
         $products_to_stores_query_raw = "select stores_id from " . TABLE_PRODUCTS_TO_STORES . " where stores_id = '" . $stores['stores_id'] . "' and products_id =' ". $products['products_id'] ."'";
         $products_to_stores_query = tep_db_query($products_to_stores_query_raw);
         $products_to_stores = tep_db_fetch_array($products_to_stores_query);
           if ($products_to_stores['stores_id'] == $stores['stores_id']) {
echo $stores['stores_name'];        
  }
       }
	 ?>

 

 

this enables you to see at a glance what products are enabled to what store without clicking on the store button for each product.

Share this post


Link to post
Share on other sites
okay i have searched this thread but not foudn what im looking for. i hope it can be done.

 

I have

 

site-a

site-b

site-c

 

each site has the EXACT same category's just the products are site specific. Is there a way to show just what products are linked to site-a? or just site-B? because right now all sites that have products in category 1 all show no matter what store they are linked too.

 

I got the same problem. Does anyone kwnow how to solve that? I am assigning different products to different stores, but they all keep on appearing in all sites, no matter how i link them. I can´t figure out what´s happening.

Share this post


Link to post
Share on other sites
I got the same problem. Does anyone kwnow how to solve that? I am assigning different products to different stores, but they all keep on appearing in all sites, no matter how i link them. I can´t figure out what´s happening.

 

I got it. I forgot to change store_id in catalog tables. Just solved.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×