Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / How to disable group price if coupon used

How to disable group price if coupon used

Views: 3,506

Results 1 to 6 of 6
6 Mar 2013, 10:24 AM
#1
crapazit avatar

crapazit

New Zenner

Join Date:
Mar 2013
Posts:
3
Plugin Contributions:
0

How to disable group price if coupon used

Hello all,

I'm a newbie, last october 2012 my brother and I we started our adventure with Zen-cart, my eshop in online since last january and everything working fine.
It's a installation from scratch, no upgrade at all, with a few of customization/plug-in (like template and CEON Back-in-stock notification)

My problem is this, I have some clients in a group rate with a 5% discount, now I'm giving some coupons 10% discount, I would like that if a customer of a group using coupon, discount price group will be disabled. I don't want double discount.

Reading other post, I understand that something has to be modified into ot_group_pricing.php, but unfortunately, I have no idea how to.
Can somebody help me?? Many thanks

12 Mar 2013, 11:25 AM
#2
crapazit avatar

crapazit

New Zenner

Join Date:
Mar 2013
Posts:
3
Plugin Contributions:
0

Re: How to disable group price if coupon used

no one can give me an help, any idea ?
many thanks

12 Mar 2013, 1:53 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to disable group price if coupon used

You can try customizing the file:
/includes/modules/order_total/ot_group_pricing.php

and add the code in RED:

  function calculate_deductions($order_total) {
    global $db, $order;
[B]
// bof: turn off Group Pricing when a Coupon is used
    if ($_SESSION['cc_id'] > 0) {
      return 0;
    }
// eof: turn off Group Pricing when a Coupon is used[/B]

You may wish to add some text about this on the Discount Coupons to say that Discount Coupons will result in the loss of the Group Discount ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Mar 2013, 9:22 AM
#4
crapazit avatar

crapazit

New Zenner

Join Date:
Mar 2013
Posts:
3
Plugin Contributions:
0

Re: How to disable group price if coupon used

Yeeeessss !!!! It works perfectly !!! many and many thanks

if I make an order is shown subtotal, group discount value and total, if I redeem a coupon is shown subtotal, group discount disappears and coupon discount appears then total.

13 Mar 2013, 1:06 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to disable group price if coupon used

Thanks for the update that this worked for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Apr 2016, 8:29 PM
#6
bigandrew avatar

bigandrew

New Zenner

Join Date:
Oct 2014
Location:
Georgia
Posts:
74
Plugin Contributions:
0

Re: How to disable group price if coupon used

Ajeh:

You can try customizing the file:
/includes/modules/order_total/ot_group_pricing.php

and add the code in RED:

function calculate_deductions($order_total) {
global $db, $order;
[B]
// bof: turn off Group Pricing when a Coupon is used
if ($_SESSION['cc_id'] > 0) {
return 0;
}
// eof: turn off Group Pricing when a Coupon is used[/B]

> 
> You may wish to add some text about this on the Discount Coupons to say that Discount Coupons will result in the loss of the Group Discount ...

This doesn't seem to work for me, however, I have installed the Online Group Pricing mod. Is there a different file to update?

Thanks,
Andrew