Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Discount Per Products Quantity


Guest

Recommended Posts

Hi,

 

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:

$easy_discount->reset();

 

4) to get the total discount set:

$easy_discount->total();

 

5) to get the number of discounts set:

$easy_discount->count();

 

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

$easy_discount->get_all();

 

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 {

$easy_discount->clear('CQTY');

}

 

Your help will be appraciated. Thanks

Plamen

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...