Burton Posted March 15, 2005 Share Posted March 15, 2005 Im wondering if anyone has worked on getting a shared shopping cart for multi-stores. I figured how to get all account history showing in each store, it was easy. But I havent looked into sharing the cart yet. Funny thing is I was able to place one order across multiple stores, but cant seem to do it again, its now losing the items when I go to another store. I assume its a matter of using the same session across stores. Do I just need to setup links with the session id urlencoded? I'll start looking into it, but I just wanted to get a feel from others first. TIA <{POST_SNAPBACK}> I second this! I personally want "one store to rule them all" because I'm running a shop that sells t-shirts for bands. We want to have the main store, where every single shirt is available, and then the band stores, so each band has their own store. It is vitally important, however, that the carts be able to go from store to store. I'd also like to know if this mod works with the STS system so each store can look different. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2005 Share Posted March 16, 2005 Hi Ryan Great contribution and seems to be working on the catalog side for both sites. However when i go into admin/configuration/store name and change the name of the store it seems to change the name on both of my stores for whichever one i choose from the top right drop down. This also seems to be the case in the configuration/multistores section - the data here doesnt seem to reflect what's in the database for both store configuration tables. I have check the STORE_ID of both stores and the configuration tables and they are linked... any ideas??? kind regards me Quote Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2005 Share Posted March 16, 2005 Hi Ryan I have another quetion.... When i come to edit a product in the catalog it goes to 'add new product' page instead of 'edit page' - is this a configuraion issue ? regards me Quote Link to comment Share on other sites More sharing options...
osjunkie Posted March 16, 2005 Share Posted March 16, 2005 On version 1.6 after loggin in with my master admin user name which is default after clicking on any module to administer I get logged out and have to log in again and it works. Anyone else have this bug? Quote Link to comment Share on other sites More sharing options...
osjunkie Posted March 17, 2005 Share Posted March 17, 2005 Multi-Store compatibility w/Optimize tep_get_tax_rate() method I am trying to get this to work with Mutli-Stores but having one heck of a time making it work. Need to integrate the following queries in general.php to the tax.php below and still retain tax exemption feature. Here are the MS general.php queries.... function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) { global $customer_id, $customer_zone_id, $customer_country_id; //rmh M-S_pricing if (tep_customer_tax_exempt($customer_id)) { return 0; } //rmh M-S_pricing if ( ($country_id == -1) && ($zone_id == -1) ) { if (!tep_session_is_registered('customer_id')) { $country_id = STORE_COUNTRY; $zone_id = STORE_ZONE; } else { $country_id = $customer_country_id; $zone_id = $customer_zone_id; } } $classname = 'tax_'.$class_id; //Unique session name for the tax class if (tep_session_is_registered('customer_id')) { //Is the customer_id registered? $classname .= '_customer'; //Add _customer to the name since it passed the check if (!tep_session_is_registered($classname)) { //Is the classname already registered? $tax_query = tep_db_query("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$class_id . "' group by tr.tax_priority"); if (tep_db_num_rows($tax_query)) { //If there are taxes... $tax_multiplier = 1.0; while ($tax = tep_db_fetch_array($tax_query)) { $tax_multiplier *= 1.0 + ($tax['tax_rate'] / 100); } $_SESSION["$classname"] = ($tax_multiplier - 1.0) * 100; //Used the global $_SESSION. Is there a way to use native API? return ($tax_multiplier - 1.0) * 100; } else { // There are no taxes so just return 0 $_SESSION["$classname"] = 0; //Used the global $_SESSION. Is there a way to use native API? return 0; } } else { //The class is registered in session so return that return $_SESSION["$classname"]; } } else { //The visitor is a guest so output 0 return 0; } } //rmh M-S_fixes end //// // Return the tax description for a zone / class // TABLES: tax_rates; function tep_get_tax_description($class_id, $country_id, $zone_id) { global $customer_id; //rmh M-S_pricing if (tep_customer_tax_exempt($customer_id)) { return 0; } //rmh M-S_pricing $tax_query = tep_db_query("select tax_description from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$class_id . "' order by tr.tax_priority"); if (tep_db_num_rows($tax_query)) { $tax_description = ''; while ($tax = tep_db_fetch_array($tax_query)) { $tax_description .= $tax['tax_description'] . ' + '; } $tax_description = substr($tax_description, 0, -3); return $tax_description; } else { return TEXT_UNKNOWN_TAX_RATE; } } Here is the tax.php that needs to be updated with above extras... class osC_Tax { var $tax_rates; // class constructor function osC_Tax() { $this->tax_rates = array(); } // class methods function getTaxRate($class_id, $country_id = -1, $zone_id = -1) { if ( ($country_id == -1) && ($zone_id == -1) ) { if (!tep_session_is_registered('customer_id')) { $country_id = STORE_COUNTRY; $zone_id = STORE_ZONE; } else { $country_id = $customer_country_id; $zone_id = $customer_zone_id; } } if (isset($this->tax_rates[$class_id][$country_id][$zone_id]['rate']) == false) { $tax_query = tep_db_query("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$class_id . "' group by tr.tax_priority"); if (tep_db_num_rows($tax_query)) { $tax_multiplier = 1.0; while ($tax = tep_db_fetch_array($tax_query)) { $tax_multiplier *= 1.0 + ($tax['tax_rate'] / 100); } $tax_rate = ($tax_multiplier - 1.0) * 100; } else { $tax_rate = 0; } $this->tax_rates[$class_id][$country_id][$zone_id]['rate'] = $tax_rate; } return $this->tax_rates[$class_id][$country_id][$zone_id]['rate']; } function getTaxRateDescription($class_id, $country_id, $zone_id) { if (isset($this->tax_rates[$class_id][$country_id][$zone_id]['description']) == false) { $tax_query = tep_db_query("select tax_description from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$class_id . "' order by tr.tax_priority"); if (tep_db_num_rows($tax_query)) { $tax_description = ''; while ($tax = tep_db_fetch_array($tax_query)) { $tax_description .= $tax['tax_description'] . ' + '; } $this->tax_rates[$class_id][$country_id][$zone_id]['description'] = substr($tax_description, 0, -3); } else { $this->tax_rates[$class_id][$country_id][$zone_id]['description'] = TEXT_UNKNOWN_TAX_RATE; } } return $this->tax_rates[$class_id][$country_id][$zone_id]['description']; } } ?> This would significantly speed up my store if I can integrate this. Thanks in advance. Brad Quote Link to comment Share on other sites More sharing options...
alfa Posted March 17, 2005 Share Posted March 17, 2005 I can not login to admin Create additional stores in Admin Login to the administration side of osCommerce. Default username is: admin Default password is: admin I have try whit username is: admin password is: admin username is: admin password is: 21232f297a57a5a743894a0e4a801fc3 Then I change in Mysql administrators change administratorspassword to only "a" Nothing helps What to do to login Alfa Quote Link to comment Share on other sites More sharing options...
mixylplik3 Posted March 17, 2005 Share Posted March 17, 2005 I would like to thank hobbzilla for his continuing efforts on the multi-shop modification. I would also like to thank you for your attention and support in this thread to people's issues, including my own. That being said, I have thrown in the towel. I was never able to get multiple stores running reliably. I was looking to host multiple stores under one domain, while sharing the customer database. If it wasn't one problem, it was another. My setup was obviously not condusive to running the osC/m-s setup or perhaps I was making the same installation mistakes over and over again. For those with the same goals as me, I suggest checking out Zen Cart. It's easier and more complete, and supports multiple stores with a single file modification. Keep up the good work, hobbzilla, I'm sorry your contribution didn't work for me. B) Quote Link to comment Share on other sites More sharing options...
Guest Posted March 17, 2005 Share Posted March 17, 2005 I would like to thank hobbzilla for his continuing efforts on the multi-shop modification. I would also like to thank you for your attention and support in this thread to people's issues, including my own. That being said, I have thrown in the towel. I was never able to get multiple stores running reliably. I was looking to host multiple stores under one domain, while sharing the customer database. If it wasn't one problem, it was another. My setup was obviously not condusive to running the osC/m-s setup or perhaps I was making the same installation mistakes over and over again. For those with the same goals as me, I suggest checking out Zen Cart. It's easier and more complete, and supports multiple stores with a single file modification. Keep up the good work, hobbzilla, I'm sorry your contribution didn't work for me. B) <{POST_SNAPBACK}> Hi cani be cheeky and ask which file you modified for that ? cheers m Quote Link to comment Share on other sites More sharing options...
depayva Posted March 18, 2005 Share Posted March 18, 2005 HI. The new_products box shows the products of the store. I want to select only a few products to show in new_products box, not all. How can i do to get this. Sorry for my english. Regards from Spain. Quote Link to comment Share on other sites More sharing options...
alfa Posted March 18, 2005 Share Posted March 18, 2005 Can anybody help me I can not log in to admin its ?n a local computer whit win xp Why can I not log in I have try to put in a new accunt in mysql but nothing helps Please help me Alfa Quote Link to comment Share on other sites More sharing options...
tetchi Posted March 18, 2005 Share Posted March 18, 2005 Hopefully just a quickie. Brilliant contribution, but I'm having problems with accessing the admin section through a shared SSL connection. In short my http server is http://www.mydomainname.co.uk My https server is https://mywebhost.com/~myusername/ When I log in via regular http everything works fine. Using SSL to connect, however, I simply get sent back to the login page repeatedly. Any thoughts or suggestions welcome, apart from this one niggle I am this happy :D with the contribution. Thanks in advance Quote Link to comment Share on other sites More sharing options...
Shiney Posted March 20, 2005 Share Posted March 20, 2005 Hey and gretings from Denmark.. I know that I can't spell ;-) Mr. hobbzilla your contribution is just what i need, but... My set up.. I like to run multi stores, whit difrent domain names, but from the same folder on my server... I have maked a small mod to: includes/configure.php // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) // define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . '/'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'http://' . $_SERVER['HTTP_HOST'] . '/'); And in includes/database_tables.php // define('TABLE_CONFIGURATION', 'configuration'); // Make a MySQL Connection mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD) or die(mysql_error()); mysql_select_db(DB_DATABASE) or die(mysql_error()); // Get a specific result $result = mysql_query("SELECT stores_config_table FROM stores WHERE stores_url = 'http://" . $_SERVER['HTTP_HOST'] . "/'") or die(mysql_error()); // get the first (and hopefully only) entry from the result $row = mysql_fetch_array( $result ); echo $row['stores_config_table']; define('TABLE_CONFIGURATION', $row['stores_config_table']); That is it... now i run 2 shops from the same folder on my server.. Can anyone see any problems whit the way i have don'it? Shiney.. Quote Link to comment Share on other sites More sharing options...
runweb Posted March 22, 2005 Share Posted March 22, 2005 In the Install guide are these steps mentioned to change the config.php: // define('HTTP_CATALOG_SERVER', '');// define('HTTPS_CATALOG_SERVER', ''); // define('ENABLE_SSL_CATALOG', ''); // define('DIR_FS_DOCUMENT_ROOT', ''); // define('DIR_WS_CATALOG', ''); // absolute path required // define('DIR_FS_CATALOG', ''); // absolute path required // define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); // define('DIR_WS_CATALOG_LANGUAGES',DIR_WS_CATALOG . 'includes/languages/'); // define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); // define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); // define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); But my config.php looks like this here (it is a new blank istallation !!): // Define the webserver and path parameters// * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://www.xxxxxx.de'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.xxxxxx.de'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/multishop/catalog/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/multishop/catalog/'); define('DIR_WS_HTTPS_CATALOG', ''); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/home/xxxxxx/www.xxxxxx.de/multishop/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); Which lines have to be comment out ??? Quote OSC Webmakers Edition modiefied with many other contribs and enhancements. + STS 4.5.7 for 2.2MS2 and RC1 Link to comment Share on other sites More sharing options...
runweb Posted March 22, 2005 Share Posted March 22, 2005 HI.The new_products box shows the products of the store. I want to select only a few products to show in new_products box, not all. How can i do to get this. Sorry for my english. Regards from Spain. <{POST_SNAPBACK}> Check in Admin Area : "Maximum Values" => "New Products listing" Quote OSC Webmakers Edition modiefied with many other contribs and enhancements. + STS 4.5.7 for 2.2MS2 and RC1 Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2005 Share Posted March 22, 2005 hi runweb have you come across this error before ? When i come to edit a product in the catalog it goes to 'add new product' page instead of 'edit page' - is this a configuraion issue ? regards me Quote Link to comment Share on other sites More sharing options...
runweb Posted March 23, 2005 Share Posted March 23, 2005 No - Version 1.6 (which is not supported anymore) was running without the image-error. But now I have a blank OSC 2.2 + MSM 1.7 installation and standing in front of the install description which is sent with the package. It seems, that there is a very old Version from OSC taken as basic because some lines are not to find in the new config-file of MS 2.2 - so I don`t know, which lines realy have to be comment out. I think this could be the error with my image management....can someon post me a correct config.php file with the comment out lines ? Quote OSC Webmakers Edition modiefied with many other contribs and enhancements. + STS 4.5.7 for 2.2MS2 and RC1 Link to comment Share on other sites More sharing options...
osjunkie Posted March 28, 2005 Share Posted March 28, 2005 Product Extra Pages, Faq & News Desk Has anyone installed one of the above packages? I want to put those in to my 1.6 install and want to make sure that they will work and that I can set which article adhear to the store definitions. Thanks, Brad Quote Link to comment Share on other sites More sharing options...
runweb Posted March 28, 2005 Share Posted March 28, 2005 I still have no idea, what is wrong with my configuration. There are always product images in new shops in original size - no matter, what I defined in "admin => images". Images are only calculated, when there is 0 or higher in field "height" and "width" - but in my default shop i defined only the "width" and all images have the same size by different width....the multishops don`t work with these settings... HELP !! Why that ??? :'( I made a new installation of OSC MS 2.2 and Multishop 1.7 and it is always the same problem with images of new shops (my product images are all stored in the default shop and multishops should have the same images).. Quote OSC Webmakers Edition modiefied with many other contribs and enhancements. + STS 4.5.7 for 2.2MS2 and RC1 Link to comment Share on other sites More sharing options...
runweb Posted March 28, 2005 Share Posted March 28, 2005 Tried to edit a category: 1054 - Unknown column 'p.products_popup_image' in 'field list' select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_popup_image, p.products_price, p.products_cog1, p.products_cog2, p.products_qty_blocks, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.distributors_id, p.manufacturers_id from products p, products_description pd where p.products_id = '28' and p.products_id = pd.products_id and pd.language_id = '2' Where is the error ? It is a default installation... :angry: AARRGGGHHHH Quote OSC Webmakers Edition modiefied with many other contribs and enhancements. + STS 4.5.7 for 2.2MS2 and RC1 Link to comment Share on other sites More sharing options...
rhyek Posted March 29, 2005 Share Posted March 29, 2005 anyone know if there's a way to have several stores offering the same product using only one set of tables for product, shipping, etc information. each store would basically be just a front which would earn commissions for that store's owner. it's a bit off-topic, i know. sorry for that, but i'd really appreciate any help. :D Quote Link to comment Share on other sites More sharing options...
osjunkie Posted March 31, 2005 Share Posted March 31, 2005 (edited) FAQDESK 98% Multi-Store Ready Just have one last bug to fix and I successfully piped over FAQDesk to work with MS. Need the following code corrected from News Desk for MS and I can make it work with FAQ. The bug is that unstored articles appear when categories are stored. // show the products in a given categorie if ($HTTP_GET_VARS['filter_id']) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.newsdesk_id, p.newsdesk_status, p.newsdesk_date_added, pd.newsdesk_article_name, pd.newsdesk_article_shorttext, pd.newsdesk_article_description, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, NULL) as final_price from " . TABLE_NEWSDESK . " p, " . TABLE_NEWSDESK_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_NEWSDESK_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and m.manufacturers_id = '" . $HTTP_GET_VARS['filter_id'] . "' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $current_category_id . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.newsdesk_id, p.newsdesk_status, p.newsdesk_date_added, pd.newsdesk_article_name, pd.newsdesk_article_shorttext, pd.newsdesk_article_description, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, NULL) as final_price from " . TABLE_NEWSDESK_DESCRIPTION . " pd, " . TABLE_NEWSDESK . " p left join " . TABLE_MANUFACTURERS . " m on p.newsdesk_id = m.manufacturers_id, " . TABLE_NEWSDESK_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $current_category_id . "'"; } Thanks, Brad Edited March 31, 2005 by osjunkie Quote Link to comment Share on other sites More sharing options...
osjunkie Posted March 31, 2005 Share Posted March 31, 2005 Has anyone used Easy Populate with Multi-Stores? Results? Tips? Quote Link to comment Share on other sites More sharing options...
penge Posted March 31, 2005 Share Posted March 31, 2005 Great contribution, having one small problem with Product Prices. When I go back to edit a product, the price (net and gross) has dissapeared and has to be re-entered again - WHY Any ideas? To Runweb remove - p.products_price, p.products_cog1, p.products_cog2, from /admin/categories.php Quote Link to comment Share on other sites More sharing options...
penge Posted April 1, 2005 Share Posted April 1, 2005 To Runweb remove - p.products_price, p.products_cog1, p.products_cog2, from /admin/categories.php <{POST_SNAPBACK}> Above info incorrect, remove: p.products_popup_image, p.products_cog1, p.products_cog2, This should stop the error but it's not a real fix. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 2, 2005 Share Posted April 2, 2005 help I don't know where to turn I have this mulit store installed and when I click on an item in the catalog I get Error! Unable to determine the page link! [/qoute] how do I fix this. the footer isn't showing up either. thank you Noppie 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.