Zen Cart Logo
Forums / All Other Contributions/Addons / One-Page Checkout [Support Thread]

One-Page Checkout [Support Thread]

Views: 629,534

Results 1,721 to 1,740 of 3,078
22 Jul 2020, 7:16 PM
#1721
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

One-Page Checkout [Support Thread]

lat9:

Somehow, part of OPC's installation didn't run. You need to run the database uninstall.sql provided in the plugin's /docs sub-directory. Then those missing database elements will be re-added on an admin-page refresh.

YOU DA BOSS, Girl!!!!!! That worked!!! Thank you SO MUCH for sticking with me until this was resolved!

22 Jul 2020, 7:38 PM
#1722
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

stellarweb:

YOU DA BOSS, Girl!!!!!! That worked!!! Thank you SO MUCH for sticking with me until this was resolved!
No problems, happy to have helped. The real question, though, is why that database installation didn't "take" initially.

Update: Remember, too, to change that OPC totals' selector in the admin configuration.

22 Jul 2020, 9:31 PM
#1723
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

Re: One-Page Checkout [Support Thread]

lat9:

No problems, happy to have helped. The real question, though, is why that database installation didn't "take" initially.

Update: Remember, too, to change that OPC totals' selector in the admin configuration.

I don't know - I installed it correctly, so don't know why the orders page and the checkout was affected.

What do you mean about changing the OPC total's selector? Right now it says #ottotal > div:first-child

23 Jul 2020, 10:42 AM
#1724
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

stellarweb:

I don't know - I installed it correctly, so don't know why the orders page and the checkout was affected.

What do you mean about changing the OPC total's selector? Right now it says #ottotal > div:first-child
I thought that your site's Bootstrap template's tpl_modules_order_total.php had been updated to use #OPC as the selector for the order's total. Check the code before making changes.

25 Jul 2020, 2:32 PM
#1725
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

I've discovered that this module doesn't work when EC Analytics is installed (https://www.zen-cart.com/downloads.php?do=file&id=1997)
I am just presented with the regular multiple page checkout.
Is this something you're aware of, and is there a solution other than switching to a different analytics module?

25 Jul 2020, 6:30 PM
#1726
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

strelitzia:

I've discovered that this module doesn't work when EC Analytics is installed (https://www.zen-cart.com/downloads.php?do=file&id=1997)
I am just presented with the regular multiple page checkout.
Is this something you're aware of, and is there a solution other than switching to a different analytics module?
I've not seen that before. Are there console logs generated? Debug-logs?

25 Jul 2020, 6:51 PM
#1727
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

lat9:

I've not seen that before. Are there console logs generated? Debug-logs?

No debug logs, or console logs.

EC Analytics is as per zc download apart from the following change after adding an admin configuration page for setting the GA number and a switch to enable/disable the module.

In includes/templates/YOUR_TEMPLATE/jscript/jscript_ec_analytics.php i replaced

if ((!defined('GOOGLE_UA') || GOOGLE_UA === "UA-XXXXXXXX-X")) {
echo '<script>alert("The Google Analytics trackingID is not yet defined in\n /includes/extra_datafiles/ec_analytics.php")</script>' ;

} else { $trackingID = GOOGLE_UA ; }
?>

with

if (GOOGLE_ANALYTICS_ENABLE == 'true'){
if ((!defined('GOOGLE_UA') || GOOGLE_UA === "UA-XXXXXXXX-X")) {
echo '<script>alert("The Google Analytics trackingID is not yet defined in Admin > Configuration > EC Analytics Configuration")</script>' ;
} else { $trackingID = GOOGLE_UA ; }
?>

so that the warning message wasn't displayed if the module wasn't active.

Site is ZC 1.5.7, latest version of OPC, and last available update of EC Analytics apart from the edit mentioned above.

25 Jul 2020, 11:56 PM
#1728
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

I did some digging around here and it seems to be related to 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING', on line 26 of includes/classes/observers/class.ec_analytics.php, meaning that commenting out that line allows OPC to load correctly upon checkout. Obviously this is going to have some negative impact on the functionality of EC Analytics though.
I assume it's somehow messing with whatever part of your code calls checkout_one rather than checkout_shipping

Does that help at all?

26 Jul 2020, 12:08 AM
#1729
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

I just looked at the auto_loaders file for both OPC and ECA

ECA is using $autoLoadConfig[90] whereas OPC is mainly using $autoLoadConfig[200]

I took a wild guess that perhaps ECA being loaded earlier than OPC was causing an issue so as a test I changed ECA to $autoLoadConfig[200] as well.
The issue went away, but not sure of the ramifications of changing the loading order like this.

Is it likely to cause issues for ECA, or should I perhaps change OPC to load earlier?

What do you advise Cindy?

26 Jul 2020, 11:13 AM
#1730
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

strelitzia:

I just looked at the auto_loaders file for both OPC and ECA

ECA is using $autoLoadConfig[90] whereas OPC is mainly using $autoLoadConfig[200]

I took a wild guess that perhaps ECA being loaded earlier than OPC was causing an issue so as a test I changed ECA to $autoLoadConfig[200] as well.
The issue went away, but not sure of the ramifications of changing the loading order like this.

Is it likely to cause issues for ECA, or should I perhaps change OPC to load earlier?

What do you advise Cindy?
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.

26 Jul 2020, 11:36 AM
#1731
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

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

26 Jul 2020, 12:06 PM
#1732
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

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.

26 Jul 2020, 12:16 PM
#1733
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

OK, got it. No point in me messing around with that then for now!

26 Jul 2020, 12:26 PM
#1734
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

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

26 Jul 2020, 1:05 PM
#1735
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

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!

21 Aug 2020, 10:59 PM
#1736
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

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.

22 Aug 2020, 11:45 AM
#1737
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

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.

22 Aug 2020, 7:59 PM
#1738
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

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?

23 Aug 2020, 11:41 AM
#1739
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

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
if (empty($_SESSION['payment'])) {
    $_SESSION['payment'] = 'paypalwpp';
}

If you're using PayPal Payments Pro, just change that *paypalwpp *to paypaldp.

23 Aug 2020, 6:16 PM
#1740
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

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?