Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Discount - How To Apply Discounts?


timmle

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.

Link to comment
Share on other sites

  • 1 month later...

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');

}

Link to comment
Share on other sites

  • 1 month later...
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!

Link to comment
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!

Link to comment
Share on other sites

  • 7 months later...

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');

}

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