swguy 32 Posted August 21, 2011 The number of a product can be seen on the product info page as the products_id part of the URL. The number of a product's category is trickier. Here's the FAQ: http://www.thatsoftwareguy.com/osc_better_together.html#faq Q: How do I determine what the category id is? A: In admin->catalog, single click on the category you're interested in. In the address bar of your browser, you will see something like categories.php?cPath=3&cID=11 If you were to double click on it, you'd see something like categories.php?cPath=3_11 The category you want to use is "11". In the same way, in the catalog you can hover over this category in the categories sidebox and see catalog/index.php?cPath=3_11 This re-confirms that the category is "11." Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
swguy 32 Posted November 10, 2011 Better Together 1.0.2 for osCommerce 2.2 and 2.3.1 has just been uploaded. This version provides "VAT" style tax recalculation; no other changes were made. Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
Guest Posted November 21, 2011 Hi There, I have installed Better Together on my local computer (WAMP) and it works fine, but once I add exactly the same code to the online version of my site I get this: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /..../..../public_html/includes/modules/order_total/ot_better_together.php on line 418 Can anyone help me here please? I just can't figure this out. Share this post Link to post Share on other sites
Guest Posted November 21, 2011 Sorry, I should have explained more than I did above. The Warning: mysql_num_rows... shows on the product_info.php page. oscommerce version 2.31. The discount is actually shown correctly on checkout confirmation though. I tried installing Better Together 1.0.2 using the same exact code that works perfectly on a local site on another online site and there nothing at all shows up on the product_info.php page in this case. Server there is PHP Version 5.2.17 / MySQL 5.1.56 if that is important. I also tried using the older version (1.0.1) of Better Together but same result. I'd really appreciate some help here if anyone has a clue what's happened. Share this post Link to post Share on other sites
Guest Posted November 23, 2011 I've sorted this problem out. Turns out that it did not play well with another contribution - MySQLi Extension (ver. 0.1-Beta) for OsC 2.x (http://addons.oscommerce.com/info/8168). I disabled the mysqli and all works fine again. Great contribution Scott, thanks very much for this. Share this post Link to post Share on other sites
OpusVista 0 Posted February 19, 2012 Hello! This is the contribution i've been looking for. But i cant get it to show in my cart. Only in the checkout. I am using the 2.2. Can anyone help me? Share this post Link to post Share on other sites
swguy 32 Posted September 18, 2012 It doesn't show in the cart unless you use Discount Preview (see the help). Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
Leo2 0 Posted April 5, 2013 (edited) I installed v.1.0.2 on 2.2rc2 It works, but not the way I need. It adds discount for just 1 qualified item. For example, if I add 10 units with 1 linked product the discount is given only for 1 unit. If same 10 unuits are bought with 2 linked products, I get discount for 2 units. How to make it to calculate discount for all 10 items in the order? So, if I give discount 10% for product XX if product YY is ordered, and a client orders 10*XX and 2 or 1 of YY, then he should get diiscount 10% for ALL 10 XX products, not just for 2 or 1. Another question - is it possible to give discount for product or category if another product of specific manufacturer from specific category is bought together? Edited April 5, 2013 by Leo2 Share this post Link to post Share on other sites
♥14steve14 657 Posted April 5, 2013 @@Leo2 You may be better off installing something like a quantity discount mod. The mod you have installed is working as it should. You have linked product A to product B so that when they are purchased as a set, a discount applies. Buying 10 of one item and only 2 of another is not 10 full sets so the discount will not apply. REMEMBER BACKUP, BACKUP AND BACKUP Share this post Link to post Share on other sites
Leo2 0 Posted April 5, 2013 I have "simple price breakdown" module installed already, adn it works for quantity discount purpose. I want to give more discount if people buy more products. The Better Discount uses quantity discounted price to calculate the discount, which is OK, but only for 1 item, not for all. Many of my bundled products should be not 1+1, but 1+5 or 1+10, and I need to have discount on sum, not on one item. Since the discount is calculted at checkout_confirmation step, I think is should be possible to calculate discount for subtotals, not for 1 item. And yes, I aldready have Bundled Products contribution installed :) Share this post Link to post Share on other sites
swguy 32 Posted April 14, 2013 Many of my bundled products should be not 1+1, but 1+5 or 1+10, and I need to have discount on sum, not on one item. Since the discount is calculted at checkout_confirmation step, I think is should be possible to calculate discount for subtotals, not for 1 item. Better Together is "buy one thing, get a second thing at a discount." I have other software that does the sort of thing you're asking for, which is shown on my home page. Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
Leo2 0 Posted April 15, 2013 That makes it same as "2gether discount" which I tried too - but it has the way it works in its name. What exactly software do you mean? Manufacturer Discount? Does it include required features of BT contribution as I described above? Share this post Link to post Share on other sites
swguy 32 Posted April 16, 2013 Better Together Admin is now available for Better Together users seeking an admin panel (and wishing to not have to modify code to configure discounts). See my home page for details. Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
swguy 32 Posted September 21, 2013 Better Together has just been updated for osCommerce 2.3.3.3. includes/modules/order_total/ot_better_together.php line 418 should be changed from $this->_check = mysql_num_rows($check_query); to $this->_check = tep_db_num_rows($check_query); Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
swguy 32 Posted May 7, 2014 Instructions for integrating Better Together with Paypal Express in osCommerce 2.3 are posted here: http://www.thatsoftwareguy.com/osc_better_together.html#paymentmodules_2.3 Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
LeeFoster 219 Posted July 31, 2019 I have this installed on my test store but it is not showing the discount on the checkout confirmation page as it should as shown in the video. Share this post Link to post Share on other sites
♥raiwa 1,472 Posted July 31, 2019 If I well remember, you are using CE BS4 (you should always mention this). So it is not surprising that this module, which is from 2013!, needs some update to get it to work with your store version. About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Share this post Link to post Share on other sites
LeeFoster 219 Posted July 31, 2019 Just now, raiwa said: If I well remember, you are using CE BS4 (you should always mention this). So it is not surprising that this module, which is from 2013!, needs some update to get it to work with your store version. You're right I am. And I thought that might be the case but had my fingers crossed that it would work out of the box, lol Share this post Link to post Share on other sites
swguy 32 Posted July 31, 2019 It should work out of the box. Do a prod to prod discount to test it to see if the issue is with categories. 1 raiwa reacted to this Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
LeeFoster 219 Posted July 31, 2019 23 minutes ago, swguy said: It should work out of the box. Do a prod to prod discount to test it to see if the issue is with categories. Nope, changed to a prod to prod and still doesn't show Share this post Link to post Share on other sites
swguy 32 Posted July 31, 2019 You went to admin-modules-order totals and installed it there, right? Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
LeeFoster 219 Posted July 31, 2019 1 minute ago, swguy said: You went to admin-modules-order totals and installed it there, right? Share this post Link to post Share on other sites
swguy 32 Posted July 31, 2019 OK just tried in Phoenix and (in addition to needing to define the tables again) there's some issue. I'll investigate. Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites
♥raiwa 1,472 Posted July 31, 2019 (edited) 24 minutes ago, swguy said: OK just tried in Phoenix and (in addition to needing to define the tables again) there's some issue. I'll investigate. For Phoenix, instead to define the tables again, you'd better update the queries to hardcoded (real) table names instead of table name constants. Table name constants are removed in Phoenix. At least on the public store side. In admin they are (still) used. Edited July 31, 2019 by raiwa About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Share this post Link to post Share on other sites
swguy 32 Posted July 31, 2019 Adding back the defines will fix the issue. In includes/modules/order_total/ot_better_together.php after php starts, add: if (!defined('TABLE_PRODUCTS')) { define('TABLE_PRODUCTS', 'products'); } if (!defined('TABLE_PRODUCTS_TO_CATEGORIES')) { define('TABLE_PRODUCTS_TO_CATEGORIES', 'products_to_categories'); } if (!defined('TABLE_TAX_RATES')) { define('TABLE_TAX_RATES', 'tax_rates'); } Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details. Share this post Link to post Share on other sites