I also have tried, also thought if i made the button read apply and then have it reload the page it would work but cannot seem to get it in the correct location
I also have tried, also thought if i made the button read apply and then have it reload the page it would work but cannot seem to get it in the correct location
If you're able to use the Fast & Easy Checkout mod (which you can download from this site), the author has included an apply coupon button to that mod. If you can't use this mod because you have other mods active (such as Checkout Without Account), maybe it's possible to deconstruct the mod and add just that feature to your site...
Unfortunately, I'm no PHP guru, and not of much service in this arena.
Hi,
I've been having the same frustration and believe I've just cracked it. I am a zen cart newbie so may need some testing.
The changes needed are quite simple and affect 2 files:
1. tpl_checkout_payment
a) Add a second FORM around the discount coupon entry box, similar to this:
echo zen_draw_form('checkout_voucher', zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'post' );
b) Add a button inside this form to submit the form and apply the voucher.
echo zen_image_submit(BUTTON_IMAGE_APPLY_VOUCHER, BUTTON_APPLY_VOUCHER_ALT);
c) Move the start of the existing form so it starts after the end of the new form.
echo zen_draw_form('checkout_payment', zen_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', ($flagOnSubmit ? 'onsubmit="return check_form();"' : ''));
2. header_php.php (under /modules/pages/checkout_payment/)
Comment or remove the following:
// get coupon code
if ($_SESSION['cc_id']) {
$discount_coupon_query = "SELECT coupon_code
FROM " . TABLE_COUPONS . "
WHERE coupon_id = :couponID";
$discount_coupon_query = $db->bindVars($discount_coupon_query, ':couponID', $_SESSION['cc_id'], 'integer');
$discount_coupon = $db->Execute($discount_coupon_query);
}
Hope it helps - Habib
Can you please post the entire contents of your tpl_checkout_payment.php file?
Sure, please see complete file attached.
Habib
Okay I will be trying this when i get home today.. Anyone else try this ? Work? Thanks gmail!
I am interested in this too. I would like for the customer to see that their discount has been applied before they have to enter their credit card information.
Has anyone got this to work successfully? If so, would you mind sharing how you did it with us less-than-guru types?
Thanks!
Didn't work for me, wouldn't allow me to go to step 2 came up page not found