Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2011
    Posts
    31
    Plugin Contributions
    0

    Default 1st order help :(

    I've been looking all over the place for an answer and cant find one so i figured id ask.

    I've been in business for a while, and just came up with a first order discount coupon. but unfortunately all I've tried has given the discount to all customers not just ones that haven't made an order yet.

    anyone got a solution? I've got plenty of costumers now but i'm trying to get more and i want to advertise the code not just have it in an email. if i just give it out to all then that puts me out quite a lot more then just to the ones who haven't ordered yet.

    so i appeal to you guys for help. if anyone can help me its you guys :)

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

    Default Re: 1st order help :(

    This is not built into Zen Cart ...

    You could customize the Discount Coupon order totals file by adding the code in RED:
    Code:
              // remove if fails address validation
              if (!$foundvalid) {
                $messageStack->add_session('checkout_payment', TEXT_REMOVE_REDEEM_COUPON_ZONE, 'caution');
                $this->clear_posts();
                if (!$foundvalid) zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));
              }
    
              // bof: remove if discount and has an order
              if ($foundvalid && $coupon_result->fields['coupon_id'] == NEW_SIGNUP_DISCOUNT_COUPON) {
                $chk_first_order = $db->Execute("select orders_id from " . TABLE_ORDERS . " where customers_id = " . $_SESSION['customer_id']);
                if (!$chk_first_order->EOF) {
                  $foundvalid = false;
                  $messageStack->add_session('checkout_payment', 'Only allowed on first order', 'caution');
                  $this->clear_posts();
                  if (!$foundvalid) zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));
                }
              }
              // eof: remove if discount and has an order
    to the file:
    /includes/modules/order_total/ot_coupon.php

    This will then use the setting in the Configuration ... GV Coupons ... for the:
    New Signup Discount Coupon ID#
    and check the customer for Orders and stop it from being used ...
    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!

  3. #3
    Join Date
    Sep 2011
    Posts
    31
    Plugin Contributions
    0

    Default Re: 1st order help :(

    ty ill try it and hope it works :) *crosses fingers*

  4. #4
    Join Date
    Sep 2011
    Posts
    31
    Plugin Contributions
    0

    Default Re: 1st order help :(

    yay it works!!! tyvm ive been working on this problem for so long :)

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

    Default Re: 1st order help :(

    Excellent ... thanks for the update that this fixed your issues!!
    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!

  6. #6
    Join Date
    Nov 2007
    Posts
    433
    Plugin Contributions
    1

    Default Re: 1st order help :(

    Hi Ajeh, I have the same problem but I'm using the last version of zc, v.1.5.1 , Do I still need to do the modification on the script ? in other words, Can that be done from the admin panel without tweaking the script ?

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

    Default Re: 1st order help :(

    If you want to customize it so that a Discount Coupon only works on the first order, you would need to do a similar customization, as this is not built in to the core code ...
    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!

 

 

Similar Threads

  1. v151 Help Needed: 1st order in and can't log in to admin!
    By gameoverbeyond in forum General Questions
    Replies: 1
    Last Post: 14 Oct 2013, 08:05 PM
  2. 1st order coupon help :(
    By wartht in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 6 Oct 2011, 06:06 PM
  3. Customer ID on 1st Order Email?
    By Opal in forum General Questions
    Replies: 10
    Last Post: 22 Nov 2010, 06:24 PM
  4. Issue with placing the 1st order
    By aforzon in forum Managing Customers and Orders
    Replies: 2
    Last Post: 9 Jul 2009, 04:21 PM
  5. 1st Credit card order - question
    By bkarnot in forum Addon Payment Modules
    Replies: 6
    Last Post: 1 Oct 2007, 07:49 PM

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