Results 1 to 10 of 25

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Blocking usage of Group Discount & Discount Coupons

    Hi.

    I'd like to prevent ppl from redeeming a discount coupon code when their in a discount group. Is that possible?

  2. #2
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: Blocking usage of Group Discount & Discount Coupons

    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?

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Blocking usage of Group Discount & Discount Coupons

    To stop anyone with a Group Discount from using a Discount Coupon, you could alter the ot_coupon.php module with something like:
    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;
      }
    Note: you should include some type of exclusion statement in your Discount Coupons ...
    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!

  4. #4
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: Blocking usage of Group Discount & Discount Coupons

    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?

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Blocking usage of Group Discount & Discount Coupons

    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!

  6. #6
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: Blocking usage of Group Discount & Discount Coupons

    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.

 

 

Similar Threads

  1. Disable coupons and group discounts when quantity discount applied?
    By abcisme in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 12 Nov 2015, 12:31 PM
  2. v154 Group Pricing Discount and Discount Coupons show on checkout, paypal/eway charge full
    By edvon in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 22 Sep 2015, 02:27 PM
  3. Set max discount for Group Discount + Discount + etc.
    By KEnik in forum Setting Up Specials and SaleMaker
    Replies: 0
    Last Post: 16 Jun 2010, 05:39 PM
  4. Restrict Wholesale or Discount Group users from using coupons
    By BettyBoop28 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 25 Feb 2010, 12:52 AM
  5. Can I restrict Discount Coupons if Group Discount used?
    By mitch_h in forum General Questions
    Replies: 3
    Last Post: 5 Nov 2009, 02:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR