Multi-Stores multiple shop system
![Contribute a new package](http://www.oscommerce.com/images/contribute_file.gif)
These modifications allow you to assign specific products and categories to multiple stores that you define in the administration panel. The products and categories will not be able to be manipulated via the web-browsers address bar (like in most other multi-shop implementations). Also, there is no "one store to rule them all". You decide which categories you want displayed on which store-front. You decide which products in that category you want displayed on which store-front. Shopping carts are NOT shared between the sites.
<script language="javascript" type="text/javascript"> </script>![]() | Dhananjaya | 21 Sep 2007 |
This solution was posted by Jean Pierre in the forums at: http://forums.oscommerce.com/index.php?s=&showtopic=70365&view=findpost&p=1079735 VERSIONS AFFECTED: Multistores version 2.0 (not v 1.9), any maybe only needed for mysql 5.xx and/or php 5.xx versions. Problem: When clicking on the "New Products" button in the Specials page the following error occurs: 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] Solution: Edit catalog/admin/includes/function/general.php line 209 (The parenthesis ")" before "pd" should be AFTER "pd".) Original 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"); 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"); Thanks to Jean Pierre Incidentally: This problem does not occur in Hobzilla's v 1.9. Line 209 in his file is as follows and also works: $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");