Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Better Together Discounting Module


swguy

Recommended Posts

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.

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...
  • 6 months later...
  • 6 months later...

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 by Leo2
Link to comment
Share on other sites

@@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

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 5 months later...

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.

Link to comment
Share on other sites

  • 7 months later...

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.

Link to comment
Share on other sites

  • 5 years later...

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

It should work out of the box.  Do a prod to prod discount to test it to see if the issue is with categories. 

Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by raiwa
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...