Hi.
I'd like to prevent ppl from redeeming a discount coupon code when their in a discount group. Is that possible?
Hi.
I'd like to prevent ppl from redeeming a discount coupon code when their in a discount group. Is that possible?
Perhaps some background info would help?
I'm doign a WagJaw campaign(CDN groupon clone) and I'm selling a membership that will entitle clients to a discount for a year. I was hoping to use group pricing for this but I hadn't realized they could also redeem coupons on top of the group pricing discount. Is there a way to add restrictions to group pricing or perhaps do this another way. Worst case I guess I could give everone a coupon code they they'd have to enter at every purchase that way they could only apply a single discount but that's allot of overhead when I could just have them part of a group.
Any thoughts?
To stop anyone with a Group Discount from using a Discount Coupon, you could alter the ot_coupon.php module with something like:
Note: you should include some type of exclusion statement in your Discount Coupons ...Code:function credit_selection() { global $discount_coupon; // note the placement of the redeem code can be moved within the array on the instructions or the title // bof: stop discount coupon for anyone in a customer group global $db; $chk_group = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'"); if ($chk_group->fields['customers_group_pricing'] > 0) { $allow_discount = false; } else { $allow_discount = true; } if ($allow_discount) { $selection = array('id' => $this->code, 'module' => $this->title, 'redeem_instructions' => MODULE_ORDER_TOTAL_COUPON_REDEEM_INSTRUCTIONS . ($discount_coupon->fields['coupon_code'] != '' ? MODULE_ORDER_TOTAL_COUPON_REMOVE_INSTRUCTIONS : '') . ($discount_coupon->fields['coupon_code'] != '' ? MODULE_ORDER_TOTAL_COUPON_TEXT_CURRENT_CODE . '<a href="javascript:couponpopupWindow(\'' . zen_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $_SESSION['cc_id']) . '\')">' . $discount_coupon->fields['coupon_code'] . '</a><br /><br />' : ''), 'fields' => array(array('title' => MODULE_ORDER_TOTAL_COUPON_TEXT_ENTER_CODE, 'field' => zen_draw_input_field('dc_redeem_code', '', 'id="disc-' . $this->code . '" onkeyup="submitFunction(0,0)"'), 'tag' => 'disc-'.$this->code ))); } // eof: stop discount coupon for anyone in a customer group return $selection; }
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: v1.5.5]
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!
Much appreciated Ajeh. I'll give that a whirl.
When you say I should include an exclusion statement, are you referring to the printed/virtual coupon itself or are you refering to code exclusion?
Just a notice such as Discount Coupons not valid with other discounts or something so people do not wonder ...
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: v1.5.5]
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!
Hi, I was wondering if I could somehow apply this idea to a coupon I am preparing for a trade show. I want to offer a coupon to all first time users, but I do not want them to be able to use the coupon if they have made a purchase in the past. Let me say first that I am in NO WAY a good coder, so if you have an idea PLEASE explain it to me as if I were a 4 year old.
Thanks.
Bookmarks