Thread: Coupon apply?

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31
  1. #21
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Coupon apply?

    Anyone find anything yet,have tried the post above and no button appeared...

  2. #22
    Join Date
    May 2007
    Location
    Los Angeles
    Posts
    89
    Plugin Contributions
    0

    Default Re: Coupon apply?

    Quote Originally Posted by ryanb4614 View Post
    Anyone find anything yet,have tried the post above and no button appeared...
    I installed the mod "Fast and easy checkout for zen cart" and worked beautifully! I love it!

  3. #23
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Coupon apply?

    I also had fec installed but I had easy signup and login installed first so it screwed things up,also doesn't work with some of the mods i have....

  4. #24
    Join Date
    Oct 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Coupon apply?

    I've made a workround for this which works fine as long as the user has javascript enabled. It adds a 'redeem' button to the voucher text area and will update and remain on the payment page regardless of what is done with the payment options and without an ugly payment error.

    add this function to /includes/modules/pages/checkout_payment/kscript_main.php

    Code:
      function goDiscount() {
            var payment = document.checkout_payment.payment;
            for (i=0; i < payment.length; i++) {
                if (payment[i].checked == true) {
                    payment[i].checked = false
                }
    
            }
            document.checkout_payment.submit();
        }
    in tpl_checkout_payment_default.php add this or equivalent next to your redemption box

    Code:
     <div class="buttonRow"><span class="button" onclick="goDiscount();">Redeem</span></div>
    now in modules/pages/checkout_confirmation/hedaer_php.php add this at around line 80:

    Code:
    $suppress_error = strlen($_POST['dc_redeem_code']) > 0 || strlen($_POST['gv_redeem_code']) > 0 ? true : false;
    and wrap the payment error a few lines below that in a condition:

    Code:
    if (!$suppress_error) {
            $messageStack->add_session('checkout_payment', ERROR_NO_PAYMENT_MODULE_SELECTED, 'error');
        }
    and finally add a !$suppress_error to the if at around line 98

    Code:
    if ($messageStack->size('checkout_payment') > 0 && !$suppress_error) {
        zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
    }
    This does allow a normal submission of the payment form and it behaves just as if 'return' had been pressed, so the minimum of change from the standard behaviour. This was important to me as I didn't want to risk any major changes at this point in the checkout process.

    oh and finally I did need to uncomment the following at line 80 of classes/message_stack.php to remove a duplicate message:

    Code:
     $output = array_values(array_unique($output));
    I hope that's of use to someone as a quick fix.

  5. #25
    Join Date
    Oct 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Coupon apply?

    correction to code:

    Code:
    if ($messageStack->size('checkout_payment') > 0 || $suppress_error) {
        zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
    }

  6. #26
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Coupon apply?

    Thanks ill give this a try this weekend

  7. #27
    Join Date
    Apr 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: Coupon apply?

    Quick fix worked for me. Still get a credit card payment error, but it works. At least now I wont have to respond to emails saying how to apply the code(people always look for the apply button

  8. #28
    Join Date
    Oct 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Coupon apply?

    It should suppress the error - have you ammended the code using that last post of mine above?

  9. #29
    Join Date
    Apr 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: Coupon apply?

    sorry for the really really late response, but any help would still be appreciated.

    I have tried a few times on and off again to implement what you have suggested and I still can not get it to take for some reason(I am pretty sure I followed the instructions correctly). The only modification I made(and I tried it with a default text too as per your example) was used a button image in replace of the text. Yet I would still get that error.

    Has anyone else got this to work without the error?

    None the less, it works well and it appears no one has canceled their order due to that error about the credit card. So thank you very much for what you posted.

  10. #30
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Coupon apply?

    hqarrse2,

    I think I found an issue with the code.

    If the shopper clicks one of the payment types before trying to update the redemption code they will get an error saying they haven't selected a payment type.

    If the shopper updates the redemption code first then the payment section will work correctly.

    Has this happened to anybody else?
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v150 Apply coupon even when discount is 0.00
    By ShopVille in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 13 Feb 2014, 11:14 PM
  2. Apply coupon with minimum order
    By jeking in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 3 Sep 2011, 03:06 PM
  3. Coupon only to apply to single item
    By chadw in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 11
    Last Post: 6 Jul 2010, 05:52 PM
  4. coupon apply in checkout
    By ryanb4614 in forum General Questions
    Replies: 0
    Last Post: 28 Mar 2009, 07:44 PM
  5. Customer didn't apply coupon - can I apply it manually?
    By ArtsygalDotNet in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 7 Nov 2007, 09:49 PM

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