Jump to content
Sign in to follow this  
timmle

Easy Discount - How To Apply Discounts?

Recommended Posts

I have followed the installation of easy discount contribution, but have no clue whatsoever of how to actually apply the discounts to the products themseleves.

 

 

The installation doesn't make it very clear on how to do this atall.

 

Can anyone assist me in this?

 

Thankyou.

Share this post


Link to post
Share on other sites

Here are some different versions of discounts. I have picked some examples from some of the other support threads

Most of these you can put at the bottom of catelog/includes/application_top.php

 

//10% discount on all orders

if ($cart->count_contents() > 0) { // cart contents

$easy_discount->add('OST','10% discount of Sub Total',$cart->show_total()*0.1); // 10% of cart total

} else{

$easy_discount->remove_type('OST'); // remove discount if present and cart gets empty

}

 

 

//10% discount on all orders OVER 50 (LOCAL CURRENCY)

if ($cart->show_total() > 50) {

$easy_discount->add('OQ','Order Amount Discount 10% for orders over '.$currencies->format(50),$cart->show_total()*0.1);

}else{

$easy_discount->remove_type('OQ'); // remove discount if present and cart gets empty

}

 

 

//A discount of 5(LOCAL CURRENCY) if 6 or more products in shopping cart

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

$easy_discount->add('CART','Order Quantity Discount',50);

} else {

$easy_discount->remove('CART');

}

 

// give 200 discount if ordered in german language

if ($language == 'german') {

$easy_discount->add('LNG','German Language Discount',200);

} else {

// take it away

$easy_discount->remove('LNG');

}

 

// give 100 discount if ordered in USD

if ($currency == 'USD') {

$easy_discount->add('CUR','USD Currency Discount',100);

} else {

// take it away

$easy_discount->remove('CUR');

}

 

 

Put the following on the page you want them to get a discount to view:

 

// give 50 discount if they view this page

$easy_discount->add('VW1','Viewing this page Discount',50);

 

 

Put in checkout_shipping.php or checkout_payment.php

// give 150 discount for local delivery

if ($order->delivery['country_id'] == STORE_COUNTRY) {

$easy_discount->add('LD','Local Delivery Discount',150);

} else {

// take it away

$easy_discount->remove('LD');

}

Share this post


Link to post
Share on other sites
Here are some different versions of discounts. I have picked some examples from some of the other support threads

Most of these you can put at the bottom of catelog/includes/application_top.php

 

After install

I tried adding this to the above location ( catalog/includes/application_top.php) :

 

//5% discount on all orders OVER 100 (LOCAL CURRENCY)

if ($cart->show_total() > 100) {

$easy_discount->add('OQ','Order Amount Discount 5% for orders over '.$currencies->format(100),$cart->show_total()*0.1);

}else{

$easy_discount->remove_type('OQ'); // remove discount if present and cart gets empty

}

 

and nothing happened in the cart at all. any ideas what I might have missed? thanks!

Share this post


Link to post
Share on other sites
After install

I tried adding this to the above location ( catalog/includes/application_top.php) :

 

//5% discount on all orders OVER 100 (LOCAL CURRENCY)

if ($cart->show_total() > 100) {

$easy_discount->add('OQ','Order Amount Discount 5% for orders over '.$currencies->format(100),$cart->show_total()*0.1);

}else{

$easy_discount->remove_type('OQ'); // remove discount if present and cart gets empty

}

 

and nothing happened in the cart at all. any ideas what I might have missed? thanks!

 

hello i installed too this contrib but dosn't work!!! anyone try it before?

please help!

thanks!

Share this post


Link to post
Share on other sites

I have successfully installed the easy discount contribution. My issue is that I have different levels of discount (4% over $150, 8% over $400, etc)

I can get one of them to work, but how do I get more than one?

Also, my sales tax calculations are still computing on the total before the discount. Any ideas there?

 

Thanks a lot

Rick Wolfe

 

 

Here are some different versions of discounts. I have picked some examples from some of the other support threads

Most of these you can put at the bottom of catelog/includes/application_top.php

 

//10% discount on all orders

if ($cart->count_contents() > 0) { // cart contents

$easy_discount->add('OST','10% discount of Sub Total',$cart->show_total()*0.1); // 10% of cart total

} else{

$easy_discount->remove_type('OST'); // remove discount if present and cart gets empty

}

 

 

//10% discount on all orders OVER 50 (LOCAL CURRENCY)

if ($cart->show_total() > 50) {

$easy_discount->add('OQ','Order Amount Discount 10% for orders over '.$currencies->format(50),$cart->show_total()*0.1);

}else{

$easy_discount->remove_type('OQ'); // remove discount if present and cart gets empty

}

 

 

//A discount of 5(LOCAL CURRENCY) if 6 or more products in shopping cart

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

$easy_discount->add('CART','Order Quantity Discount',50);

} else {

$easy_discount->remove('CART');

}

 

// give 200 discount if ordered in german language

if ($language == 'german') {

$easy_discount->add('LNG','German Language Discount',200);

} else {

// take it away

$easy_discount->remove('LNG');

}

 

// give 100 discount if ordered in USD

if ($currency == 'USD') {

$easy_discount->add('CUR','USD Currency Discount',100);

} else {

// take it away

$easy_discount->remove('CUR');

}

 

 

Put the following on the page you want them to get a discount to view:

 

// give 50 discount if they view this page

$easy_discount->add('VW1','Viewing this page Discount',50);

 

 

Put in checkout_shipping.php or checkout_payment.php

// give 150 discount for local delivery

if ($order->delivery['country_id'] == STORE_COUNTRY) {

$easy_discount->add('LD','Local Delivery Discount',150);

} else {

// take it away

$easy_discount->remove('LD');

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×