lelijk Posted April 26, 2006 Share Posted April 26, 2006 Hi all, First of all THANKS for this great contribution. My question is: I want to integrate the all_products page within the multiple shop system but get lost with the query that get the products..........the query is: $listing_sql = "select p.products_id, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id $where order by pd.products_name"; The problem I have overhere is that I've tried about 30/40 combinations to make this multishop-compatible but.............I'm a PHP/SQL NOOB!!! :blink: Can anyone please help me with this one? Thanks in advance! Chris P.S. Wrongly posted before as new topic, excuse me! Quote Link to comment Share on other sites More sharing options...
Tonka128 Posted April 27, 2006 Share Posted April 27, 2006 Hi PPl Has anyone installed Payapl IPN over multi stores? I gve it a shot last night ( IM not a coder so i was basically just using winmerge to show me diffs in files and merging them where it seemed appropriate,) admin side works fine and everything looks good but my store just comes up as a blank page now. :( any ideas wiould be greatly apprec. cheers Quote Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2006 Share Posted May 7, 2006 Hi there, I am using a MSRP contribution and wondered if you could help me with this chunk of code?Please. This is from the product_info.php: tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); //rmh M-S_pricing begin /* if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } */ $pf->loadProduct((int)$HTTP_GET_VARS['products_id'], (int)$languages_id); $products_price=$pf->getPriceString(); //rmh M-S_pricing end Mine: tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $products_price = '<table class="PriceList" border="0" width="100%" cellspacing="0" cellpadding="0">'; $new_price = tep_get_products_special_price($product_info['products_id']); if ($product_info['products_msrp'] > $product_info['products_price']) $products_price .= '<tr><td>' . TEXT_PRODUCTS_MSRP . '</td><td class="oldPrice" align="right">' . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; $products_price .= '<tr><td>' . TEXT_PRODUCTS_OUR_PRICE . '</td>'; if ($new_price != '') {$products_price .= '<td class="oldPrice"';} else {$products_price .= '<td';} $products_price .= ' align=right>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; if ($new_price != '') {$products_price .= '<tr class="productSpecialPrice"><td>' . TEXT_PRODUCTS_SALE . '</td><td align=right>' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';} if ($product_info['products_msrp'] > $product_info['products_price']) {if ($new_price != '') {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] - $new_price) , tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_msrp'] - $new_price) / $product_info['products_msrp']) * 100) . '% )</td></tr>';} else {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] - $product_info['products_price']) , tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_msrp'] - $product_info['products_price']) / $product_info['products_msrp']) * 100) . '% )</td></tr>';}} else {if ($new_price != '') {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_price'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_price'] - $new_price) / $product_info['products_price']) * 100) . '% )</td></tr>';}} $products_price .= '</table>'; Any help would be appreciated :) Thanks, Stephanie Quote Link to comment Share on other sites More sharing options...
Proud Posted May 7, 2006 Share Posted May 7, 2006 You can always have one site : http://www.yourstore.com/ with multiple stores within that site: http://www.yourstore.com/store1 http://www.yourstore.com/store2 Does that work? Yes that does work, that's exactly what I was wondering. So I guess I would just put links of some sort from http://www.yourstore.com/ to http://www.yourstore.com/store1 and to http://www.yourstore.com/store2 ? Or would I have store 1 and store 2 being categories from the initial site? I'm sorry to be such a pain. Quote Link to comment Share on other sites More sharing options...
Otto Posted May 11, 2006 Share Posted May 11, 2006 Yes that does work, that's exactly what I was wondering. So I guess I would just put links of some sort from http://www.yourstore.com/ to http://www.yourstore.com/store1 and to http://www.yourstore.com/store2 ? Or would I have store 1 and store 2 being categories from the initial site? I'm also wondering about the same thing. I need multiple stores (different vendors): www.yourstore.com/store1 www.yourstore.com/store2 and then for customers to be able to browse and shop items from all of the multiple stores from just: www.yourstore.com Is this possible? Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted May 12, 2006 Author Share Posted May 12, 2006 I'm also wondering about the same thing. I need multiple stores (different vendors): www.yourstore.com/store1 www.yourstore.com/store2 and then for customers to be able to browse and shop items from all of the multiple stores from just: www.yourstore.com Is this possible? You are defeating the purpose of Multi-Stores by having multiple stores but the entire set of products from both available from the main store. This situation is not set by default with Multi-stores.. You would have to hack it to allow stores to share their shopping carts.. so the short answer is "no" - it isn't possible. The long answer is "yes" it is possible with some effort and changing of the code.. however, I would state again above, WHY would you want to? If you just are wanting to separate the vendor or distributor or perhaps give commission or something other, it would make more sense to use some of the other contribs to satisfy your requirements. There is a muti-vendor shipping as well as an affiliate contrib. Good luck! Quote Link to comment Share on other sites More sharing options...
Otto Posted May 13, 2006 Share Posted May 13, 2006 The long answer is "yes" it is possible with some effort and changing of the code.. however, I would state again above, WHY would you want to? An example website for what I'm talking about would be buyolympia.com. It's an online store made up of products belonging to many different artists and stores. People can browse and buy all items from all artists and stores in one shopping cart and/or browse by each artist/store. Each artist/store gets a subdomain (i.e. www.buyolympia.com/newstore) The advantages to this method are: - Allowing the website to essentially offer online ecommerce presence to someone who wants to sell products/open an online store and offer them a way to accept credit cards. buyolympia.com also allows for each store to have a completely custom look which allows for artists/stores who already have their own website to integrate their buyolympia store to their own website's look. - Each store gets better exposure by having their products/store listed in one central marketplace. This is also convenient to shoppers by being able to browse and buy from multiple stores in one shopping cart, as well as being able to find out about other products/stores while they're shopping. I would love for this functionality to be added to this contribution or perhaps a new one created for that purpose as it would allow me to keep using oscommerce. I'm not a coder so I wouldn't know where to begin... But this makes me wonder if what I'm describing could be achieved by clever use of categories of some kind instead, where each store is treated as its own category (and each "store category" is able to have its own look/template) and its own subdomain. Quote Link to comment Share on other sites More sharing options...
Proud Posted May 13, 2006 Share Posted May 13, 2006 Hobbzilla, thank you for all your help, I am going to try to use the multi vendor contribution, because simply put I use dropshippers and I want to put items from two dropshippers up, and of course the shipping will be different depending on which items people order and from which dropshipper, so if I use the multi vendor shipping that should solve my problem I'm hoping. This is an awesome contribution and if the multi vendor shipping won't work I'll be using this one for sure. Again thank you for all your help with my questions. :thumbsup: Quote Link to comment Share on other sites More sharing options...
deepfreeze Posted May 17, 2006 Share Posted May 17, 2006 Have tested MS and works fine so placed files on live server and hit problem when going to look at products with following error; 1054 - Unknown column 'p.products_id' in 'on clause' select distinct p.products_id, p.products_image, p.products_tax_class_id, IF(s.status = '1' AND s.stores_id = '1', s.specials_new_products_price, p.products_price) as products_price from products p left join specials s on p.products_id = s.products_id and s.stores_id = '1', products_to_categories p2c, categories c INNER JOIN products_to_stores p2s ON p.products_id = p2s.products_id where p2s.stores_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '90' and p.products_status = '1' order by p.products_date_added desc limit 9 [TEP STOP] Have reloaded database and checked files but at a loss or not seeing wood for trees. Any ideas would be welcome. Many thanks :blush: Quote Link to comment Share on other sites More sharing options...
deepfreeze Posted May 18, 2006 Share Posted May 18, 2006 Further to my post above; 1054 - Unknown column 'p.products_id' in 'on clause' select distinct p.products_id, p.products_image, p.products_tax_class_id, IF(s.status = '1' AND s.stores_id = '1', s.specials_new_products_price, p.products_price) as products_price from products p left join specials s on p.products_id = s.products_id and s.stores_id = '1', products_to_categories p2c, categories c INNER JOIN products_to_stores p2s ON p.products_id = p2s.products_id where p2s.stores_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '90' and p.products_status = '1' order by p.products_date_added desc limit 9 [TEP STOP] I now understand the problem and this was me setting my database on a server with SQL 5.0.19 running. After version 5.0.12 the SQL syntax changed to bring it into line with the 2003 standards. This resulted in the error above as the structure of JOIN, SELECT AND ON has changed and therefore the code used above in Multi Stores will not work. This is not meant to be critical of this superb Contribution - just a warning to any one looking to use it and also to future proof it. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 19, 2006 Share Posted May 19, 2006 The long answer is "yes" it is possible with some effort and changing of the code.. however, I would state again above, WHY would you want to? Good luck! Why because I am looking to create a virtual mall with one shopping cart. The dealer in a consignment antique mall are at different levels of computer literacy. But they seem to all want their own look. Your solution is polished enough and you are available for newbie oscommerce people to contact. The other mall contributions are not active. Plus I would be glad to help develop the solution with your guidance. Mark Quote Link to comment Share on other sites More sharing options...
Otto Posted May 20, 2006 Share Posted May 20, 2006 Why because I am looking to create a virtual mall with one shopping cart. The dealer in a consignment antique mall are at different levels of computer literacy. But they seem to all want their own look. Your solution is polished enough and you are available for newbie oscommerce people to contact. The other mall contributions are not active. Plus I would be glad to help develop the solution with your guidance.Mark I've since come across oscMall. It's an open source fork of oscommerce. I've yet to try it out but the community support is not as big as oscommerce and all the example sites that are mentioned on their site no longer work... Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted May 20, 2006 Author Share Posted May 20, 2006 There are a number of osc-"mall" type contributions. Although M-S may be 'hacked' to work like them, it wasn't intended or written that way. It is certainly not a full "virtual mall".. and I have found few that are what they claim to be. I just urge people to try out various contributions on a test server or look at some of the examples of people's sites and decide for yourself which one is going to: a) do what you want to do with the least amount of changes B) has an active following & support system -- from other users or the orig. developer.. (I mean look at easy populate.. it is a top downloaded contrib; and I haven't seen a package update by the original author and support is from it's loyal users -- kind of like osCommerce : support & development ;) c) makes the least amount of changes to the core code as you are able to live with. M-S fails this big time!! There is just simply no easy way to do it without modifying so many files.. the code is just not modular enough. Good luck in your search! Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted May 20, 2006 Author Share Posted May 20, 2006 I now understand the problem and this was me setting my database on a server with SQL 5.0.19 running. After version 5.0.12 the SQL syntax changed to bring it into line with the 2003 standards. This resulted in the error above as the structure of JOIN, SELECT AND ON has changed and therefore the code used above in Multi Stores will not work. This is not meant to be critical of this superb Contribution - just a warning to any one looking to use it and also to future proof it. Thanks for the heads up! I have not tested M-S with the 5.x mySQL. Perhaps there will be other that can chime in and offer fixes.. I am by no means a SQL guru (or a php guru for that matter! ) ;) Quote Link to comment Share on other sites More sharing options...
Guest Posted May 20, 2006 Share Posted May 20, 2006 I've since come across oscMall. It's an open source fork of oscommerce. I've yet to try it out but the community support is not as big as oscommerce and all the example sites that are mentioned on their site no longer work... I have loaded oscMall and the user manual cost $20. not a big deal but I agree with Otto on the community issue. I have also loaded php-multimall. It is a phpnuke oscommerce "joint venture." I have an error and the admin page doesn't display. I can't see the cause. I talked with the dev and he just refered me to previous posts that are basically not relevant. Then I saw the deepfreeze post and I am willing to bet that is the cause. At least there was an error detected. I have a good understanding of php and mysql but it is always good to have someone to keep you from getting lost in the forest when you can't see the trees. There is much to be said for an active community. Thanks to deepfreeze. I haven't loaded multi-store yet and everything on my dev server and prod server is the latest releases. The servers are basically identical on the soft side. One thing for sure, I will learn how osc and m-s works. I'll let you know how it goes. Quote Link to comment Share on other sites More sharing options...
deepfreeze Posted May 20, 2006 Share Posted May 20, 2006 Mark. All I understand is that the table columns are currently selected up front but under the new standard once the Join is employed the reference is then dropped and so the error strikes. Hope this makes sense. :thumbsup: Quote Link to comment Share on other sites More sharing options...
redrum Posted May 21, 2006 Share Posted May 21, 2006 (I mean look at easy populate.. it is a top downloaded contrib; and I haven't seen a package update by the original author and support is from it's loyal users -- kind of like osCommerce : support & development ;) HEHEHE man, I really miss Chemo around here.. // Fredrik Quote Link to comment Share on other sites More sharing options...
facelessface Posted May 24, 2006 Share Posted May 24, 2006 Have tested MS and works fine so placed files on live server and hit problem when going to look at products with following error; 1054 - Unknown column 'p.products_id' in 'on clause' select distinct p.products_id, p.products_image, p.products_tax_class_id, IF(s.status = '1' AND s.stores_id = '1', s.specials_new_products_price, p.products_price) as products_price from products p left join specials s on p.products_id = s.products_id and s.stores_id = '1', products_to_categories p2c, categories c INNER JOIN products_to_stores p2s ON p.products_id = p2s.products_id where p2s.stores_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '90' and p.products_status = '1' order by p.products_date_added desc limit 9 Has anyone found a solution to using Multi-Stores with mySQL5.0.12 yet??? Looking for a solution! Cheers, mike Quote my sites: ---------- www.preciousmetal-online.co.uk www.liparazzi.com www.yaoh.co.uk Link to comment Share on other sites More sharing options...
Guest Posted May 24, 2006 Share Posted May 24, 2006 Has anyone found a solution to using Multi-Stores with mySQL5.0.12 yet??? Looking for a solution! Cheers, mike Sorry Guys I haven't gotten there yet. That is next. Got a customer coming Friday to see that and vmall v1.2 that I just got up. What a PIA. Not the devs fault. The software works but the conversion to mysql5 and latest php has made lots of quirks. Plus a typo. BTW. My config is RHEL4 ES and all the latest version of everything so please that in mind for the next posts. One interesting thing to note is in the default php.ini file arround line 1000 session.hash_bits_per_character = 5 is the default. Kept me from logging in on the admin side. Not sure why. Changed it to 4 and the it worked. I don't think it is a oscommerce thing but a vmall issue. Mark Quote Link to comment Share on other sites More sharing options...
facelessface Posted May 25, 2006 Share Posted May 25, 2006 Still looking for a solution to the mysql 5.0.12+ problem.. I have two weeks to get this osc site up and running - hence I am willing to pay someone to fix this contrib and get it working for me. Obviously if someone wants to do it for free that would be even better :D if you think that you can fix it, in the next couple of days, - then please pm me -and if you're charging for the privilige, please include a cost for the fix, Ta Mike :rolleyes: Quote my sites: ---------- www.preciousmetal-online.co.uk www.liparazzi.com www.yaoh.co.uk Link to comment Share on other sites More sharing options...
facelessface Posted May 25, 2006 Share Posted May 25, 2006 Still looking for a solution to the mysql 5.0.12+ problem.. I have two weeks to get this osc site up and running - hence I am willing to pay someone to fix this contrib and get it working for me. Obviously if someone wants to do it for free that would be even better :D if you think that you can fix it, in the next couple of days, - then please pm me -and if you're charging for the privilige, please include a cost for the fix, Ta Mike :rolleyes: OK - after my last post i've found a way to fix the first error with mysql 5.0 at least :) still working on it, but i'm thinking just working from here: http://www.oscommerce.com/ext/update-20051...l#_Toc119693716 should fix the problems.. I'll let you know... mike Quote my sites: ---------- www.preciousmetal-online.co.uk www.liparazzi.com www.yaoh.co.uk Link to comment Share on other sites More sharing options...
facelessface Posted May 25, 2006 Share Posted May 25, 2006 OK - after my last post i've found a way to fix the first error with mysql 5.0 at least :) still working on it, but i'm thinking just working from here: http://www.oscommerce.com/ext/update-20051...l#_Toc119693716 should fix the problems.. I'll let you know... mike Ok think i've fixed all the errors i could find so far.. There are probably more... Let me know if anyone wants me to post the changes here, as i feel like i'm talking to myself at the moment :-" Quote my sites: ---------- www.preciousmetal-online.co.uk www.liparazzi.com www.yaoh.co.uk Link to comment Share on other sites More sharing options...
Guest Posted May 25, 2006 Share Posted May 25, 2006 Z, Can you assist with the field population problem, per following code from /catalog/admin/customers.php? //rmh M-S_pricing edited next line $customers_query = tep_db_query("SELECT c.customers_id, c.customers_groups_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, c.customers_tax_exempt, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " as c left join " . TABLE_ADDRESS_BOOK . " AS a on c.customers_default_address_id = a.address_book_id WHERE ((c.customers_id)= '" . (int)$HTTP_GET_VARS['cID'] . "')"); $customers = tep_db_fetch_array($customers_query); //ned exception for processing when query is null but table >>cutomers<< is not if (tep_db_num_rows($customers) == 1) { $cInfo = new objectInfo($customers); } else { $cust_only_query = tep_db_query("SELECT customers_id, customers_groups_id, customers_gender, customers_firstname, customers_lastname, customers_dob, customers_email_address, customers_tax_exempt, customers_telephone, customers_fax, customers_newsletter FROM " . TABLE_CUSTOMERS . " WHERE ((customers_id)= '" . (int)$HTTP_GET_VARS['cID'] . "')"); $cust_res = tep_db_fetch_array($cust_only_query); if (tep_db_num_rows($cust_res) == 1) { $cust_Info1 = new objectInfo($cust_res); } $addr_only_query = tep_db_query("SELECT customers_id, entry_company, entry_gender, entry_firstname, entry_lastname, entry_street_address, entry_street_address2, entry_suburb, entry_postcode, entry_city, entry_state, entry_telephone, entry_fax, entry_zone_id, entry_country_id FROM " . TABLE_ADDRESS_BOOK . " WHERE ((customers_id)= '" . (int)$HTTP_GET_VARS['cID'] . "')"); $addr_res = tep_db_fetch_array($cust_only_query); if (tep_db_num_rows($addr_res) == 1) { $cust_Info2 = new objectInfo($addr_res); } } } Problem is re-assigning, with null checking, array vars $cust_Info1, $cust_Info2 back into array $cinfo so the form/display fields populate, even if one of the DB updates fail, leaving only one of the tables populated! thus the check: if (tep_db_num_rows($customers) == 1) { $cInfo = new objectInfo($customers); } else { Tested for this by entering in >>customers<< table via ODBC, without add to the >>address_book<< table. OMR Quote Link to comment Share on other sites More sharing options...
Guest Posted May 27, 2006 Share Posted May 27, 2006 (edited) I just did a fresh install of oscommerce, and multi stores. In the admin section.. When I hit administrators I get the following error: Parse error: parse error, unexpected '}' in C:\htdocs\cat1\admin\administrators.php on line 535 When I remove the } The page loads, but I get this text outputed where the admins should be: administrators_id) ) { echo ' ' . "\n"; } else { echo ' ' . "\n"; } ?> I just copied over the file from 1.7.. Any Ideas? Thanks! Hi all, I have the same error. Anybody can help? Thks Edited May 27, 2006 by 3nana Quote Link to comment Share on other sites More sharing options...
johnson4 Posted May 27, 2006 Share Posted May 27, 2006 Im having a strange issue. I have 2 catalogs setup with this contrib but both catalog are displaying the catagories that belong to the default store......even though the db shows the correct values in the catagories _to_store table. any idea how this is happening or how I can get the right catagories showing up? 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.
Note: Your post will require moderator approval before it will be visible.