Anyone find anything yet,have tried the post above and no button appeared...
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!
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....
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
in tpl_checkout_payment_default.php add this or equivalent next to your redemption boxCode: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(); }
now in modules/pages/checkout_confirmation/hedaer_php.php add this at around line 80:Code:<div class="buttonRow"><span class="button" onclick="goDiscount();">Redeem</span></div>
and wrap the payment error a few lines below that in a condition:Code:$suppress_error = strlen($_POST['dc_redeem_code']) > 0 || strlen($_POST['gv_redeem_code']) > 0 ? true : false;
and finally add a !$suppress_error to the if at around line 98Code:if (!$suppress_error) { $messageStack->add_session('checkout_payment', ERROR_NO_PAYMENT_MODULE_SELECTED, 'error'); }
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.Code:if ($messageStack->size('checkout_payment') > 0 && !$suppress_error) { zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); }
oh and finally I did need to uncomment the following at line 80 of classes/message_stack.php to remove a duplicate message:
I hope that's of use to someone as a quick fix.Code:$output = array_values(array_unique($output));
correction to code:
Code:if ($messageStack->size('checkout_payment') > 0 || $suppress_error) { zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); }
Thanks ill give this a try this weekend
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
It should suppress the error - have you ammended the code using that last post of mine above?
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.
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
Bookmarks