Re: One-Page Checkout [Support Thread]
Hi,
I wonder if it is a simple matter to incorporate the action of the rather nice gift wrapping module in OPC?
The module presents a set of options for gift wrapping surcharge at checkout.
Gift Wrapping module:
https://www.zen-cart.com/downloads.php?do=file&id=267
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
gernot
Hi,
I wonder if it is a simple matter to incorporate the action of the rather nice gift wrapping module in OPC?
The module presents a set of options for gift wrapping surcharge at checkout.
Gift Wrapping module:
https://www.zen-cart.com/downloads.php?do=file&id=267
That Gift Wrapping module touches too many core-files and provides a non-standard (i.e. displayed on checkout_shipping rather than checkout_payment) order-total. The concept is good, but will need some re-thinking for an integration with OPC.
Re: One-Page Checkout [Support Thread]
OK, got it. No point in me messing around with that then for now!
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
You didn't indicate in your original posting, @strelitzia, but are you, by chance running zc157?
If that's the case, there's a bug in the zc157 core, identified by @mc12345678 (
https://github.com/zencart/zencart/pull/3654), that prevents multiple observers from watching the same event.
Yes, I am running 157. I forgot to mention that in the original post, but added it to the bottom of post #1727
I'll check out that bug on git.
Thanks
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
strelitzia
Yes, I am running 157. I forgot to mention that in the original post, but added it to the bottom of post #1727
I'll check out that bug on git.
Thanks
I see that now! Thanks, BTW, for the detailed investigation ... it helped to provide the solution to the issue!
Re: One-Page Checkout [Support Thread]
Silly question, but would it be easy to configure an auto-refresh when a checkbox is clicked INSTEAD of the apply button?
We have an Optional Shipping Insurance module installed. On the one page checkout, we fear that a customer will click the checkbox, but overlook the "Apply" button. It would be so much easier if the ajax form would auto-regresh when selected (kind of like what happens when you select a different shipping option).
Perhaps you can tell me what I would have to add to which file to make the checkbox (or all checkboxes) on the checkout page auto-refresh the total so that we can get rid of the additional "Apply" button? That would also save the customer an extra "click" by having this functionality.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
Jeff_Mash
Silly question, but would it be easy to configure an auto-refresh when a checkbox is clicked INSTEAD of the apply button?
We have an Optional Shipping Insurance module installed. On the one page checkout, we fear that a customer will click the checkbox, but overlook the "Apply" button. It would be so much easier if the ajax form would auto-regresh when selected (kind of like what happens when you select a different shipping option).
Perhaps you can tell me what I would have to add to which file to make the checkbox (or all checkboxes) on the checkout page auto-refresh the total so that we can get rid of the additional "Apply" button? That would also save the customer an extra "click" by having this functionality.
Checkbox-handling on page transitions is notoriously finicky due to the transitional nature of those inputs.
One-Page Checkout's jQuery for the checkout_one page performs an auto-submit (non-confirmation) when a page element with a class of opc-cc-submit is clicked. That said, you could try adding that class to the optional insurance order-total's checkbox.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
Checkbox-handling on page transitions is notoriously finicky due to the transitional nature of those inputs.
One-Page Checkout's jQuery for the checkout_one page performs an auto-submit (non-confirmation) when a page element with a class of opc-cc-submit is clicked. That said, you could try adding that class to the optional insurance order-total's checkbox.
Awesome, thanks for pointing me in the right direction. I just added the class="opc-cc-submit" to that optional insurance block and it seems to work.
There is still a little problem that I have, and hopefully you can help.
When looking at the One Page Checkout screen, the "Optional Insurance" is displayed first (before selecting the Payment). What happens is that now, when a customer clicks the box to apply the Insurance, it does the auto-submit (non-confirmation)......but because no default payment method is selected, we get the automatic message that says you need to select a payment first.......so the Optional Insurance isn't applied.
Since we only have two payment options (Paypal or Check/Money Order), 99.99% of our customers are going to select the PayPal option. Can we modify the one-page checkout to have that option auto-selected so that the error can be eliminated when the Insurance is applied?
If not, then is there a way to display the Optional Insurance block BELOW the payment options so that a customer doesn't apply it before they select their payment?
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
Jeff_Mash
Awesome, thanks for pointing me in the right direction. I just added the class="opc-cc-submit" to that optional insurance block and it seems to work.
There is still a little problem that I have, and hopefully you can help.
When looking at the One Page Checkout screen, the "Optional Insurance" is displayed first (before selecting the Payment). What happens is that now, when a customer clicks the box to apply the Insurance, it does the auto-submit (non-confirmation)......but because no default payment method is selected, we get the automatic message that says you need to select a payment first.......so the Optional Insurance isn't applied.
Since we only have two payment options (Paypal or Check/Money Order), 99.99% of our customers are going to select the PayPal option. Can we modify the one-page checkout to have that option auto-selected so that the error can be eliminated when the Insurance is applied?
If not, then is there a way to display the Optional Insurance block BELOW the payment options so that a customer doesn't apply it before they select their payment?
Sure, you can create a little addition to the checkout_one page's processing. Create the file /includes/modules/pages/checkout_one/header_php_paypal_default.php containing:
PHP Code:
<?php
if (empty($_SESSION['payment'])) {
$_SESSION['payment'] = 'paypalwpp';
}
If you're using PayPal Payments Pro, just change that paypalwpp to paypaldp.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
Sure, you can create a little addition to the checkout_one page's processing.
Thanks! That works great! I think we are almost there, but we are inadvertently causing another side effect by doing this.
Where we now stand:
1. Customer comes to the One Page Checkout screen. Payment is now auto-selected thanks to your recommendation above. This is GOOD.
2. Customer checks the Optional Insurance box. This automatically refreshes the page now, and updates the total at the bottom of the page. Also GOOD!
However, after the auto-refresh which applies the insurance to the total, the page reloads WITHOUT the Optional Insurance box checked. (The order total does reflect the Optional Insurance added, it's just that the checkbox is not showing it being selected).
So now what happens is that when I click the Confirm Order button, it doesn't confirm the order. Instead, it refreshes the page REMOVING the Optional Insurance (because it wasn't checked) and updates the order total without the insurance.
So Problem #1: What do I need to set to keep the checkbox checked? I assume it's setting that Session variable in someway.
And Problem #2: Will solving #1 above cause the order to be Confirmed on the first click of the button?