Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Discount Per Products Quantity


Recommended Posts



I'm trying to install this contribution - http://www.oscommerce.com/community/contributions,3367 - but I can not figure how to actual apply the discounts. This is what it says in the install file:


You can now add a discount with its description anywhere.


(if used inside functions : do not forget to add $easy_discount to your global variable definitions)


supported class command formats:


1) to set a discount:

$easy_discount->set('discount name','discount description',discount);


2) to remove a discount by name:

$easy_discount->clear('discount name');


3) to remove all discounts:



4) to get the total discount set:



5) to get the number of discounts set:



6) to get all discounts (used by order total module):



7) to get 1 specific discount array

$easy_discount->get('discount name');



example :


if ($cart->count_contents() > 5) {

$easy_discount->set('CQTY','Cart Quantity Discount',500);

} else {




Your help will be appraciated. Thanks


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...