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

One-Page Checkout [Support Thread]

Views: 629,378

Results 2,141 to 2,160 of 3,077
13 Feb 2022, 1:45 PM
#2141
lat9 avatar

lat9

Administrator

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

One-Page Checkout [Support Thread]

lat9:

I've just submitted v2.3.11 of One-Page Checkout for the Zen Cart moderators' review. This version corrects a PHP Fatal error introduced in v2.3.10 ... as identified in GitHub issue #308.

I'll post back here when it's available for download.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095

13 Feb 2022, 10:02 PM
#2142
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: One-Page Checkout [Support Thread]

Used to have a sign above my desk...

Pobody's Nerfect!

Should YOUR_ADMIN/includes/init_includes/init_checkout_one.php line 18 show 2.3.11 vs 2.3.10?

14 Feb 2022, 7:39 PM
#2143
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

dbltoe:

Used to have a sign above my desk...

Pobody's Nerfect!

Should YOUR_ADMIN/includes/init_includes/init_checkout_one.php line 18 show 2.3.11 vs 2.3.10?
Sigh, yes.

15 Feb 2022, 5:30 PM
#2144
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: One-Page Checkout [Support Thread]

The reason I found the version situation was I was trying to duplicate a problem with a customer's site. I tried loading the newer version to see if it made any difference. Still having problems nailing it down. You know how much of a "dog with a bone" I can be on these things.:P

In case anyone else wants to try, here's the scenario. After the site owner said a customer complained that they were getting the wrong item, he contacted me and I found that the latest order made by that person was as a Guest. The customer had created an account a year prior, couldn't remember log in, and just did a guest checkout. When the owner updated the status from pending to processing, it sent out the e-mail BUT, it did not sent out the Guest e-mail with the link to enter your order# etc. It sent an e-mail with a link to his account history from his previous account which did NOT include the latest item (of course).:ohmy:

The account history e-mail link triggered the customer's stored info in their browser and they logged in only to find their latest order NOT there (again, of course) and assumed they were getting the old order versus the new.

I tried duplicating the problem using two test accounts that were created when we (myzencarthost) upgraded the site originally. I ordered the same item for each using the Guest checkout. One received the "correct" e-mail while the other received an e-mail listing the older test order.:ohmy:

Oddly enough, the one giving the incorrect link (https://YOUR_SITE.com/index.php?main_page=account_history_info&order_id=####) had NONE of the formatting normally found with an update email. No logo at the top, border around the text, Copyright at the bottom, etc.

When I checked the confirmation e-mail, it had no formatting either.:ohmy:

AND..... I have not been able to recreate the problem with the two test accounts. Nor, have we gotten any feedback from customers that anything is amiss. All logs were checked to no avail and I continue to scratch my head over this one.

Using guest checkout for the two test accounts has not produced an incorrect e-mail since the very first one

Perhaps someone else has had this or knows a better way to troubleshoot than just continuing to do test checkouts.

THANX

17 Feb 2022, 8:36 AM
#2145
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

I don't think this has been answered elsewhere but, given that jscript_square.php is used in includes/modules/pages/checkout_one, do the changes made to the Square plugin (https://www.zen-cart.com/showthread.php?228664-The-end-of-Zen-Cart-in-Europe-SCA-kills-payments&p=1386676#post1386676) affect the interoperation of OPC & Square?

The file changes to jscript_square.php are shown here:
https://github.com/brittainmark/zencart/commit/5002437cca63313cb1510c761c0cfad0723b2dc8

17 Feb 2022, 11:32 AM
#2146
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

simon1066:

I don't think this has been answered elsewhere but, given that jscript_square.php is used in includes/modules/pages/checkout_one, do the changes made to the Square plugin (https://www.zen-cart.com/showthread.php?228664-The-end-of-Zen-Cart-in-Europe-SCA-kills-payments&p=1386676#post1386676%29 affect the interoperation of OPC & Square?

The file changes to jscript_square.php are shown here:
https://github.com/brittainmark/zencart/commit/5002437cca63313cb1510c761c0cfad0723b2dc8
Noting that the jscript_square.php is not part of the OPC distribution, but the answer to your question would be "Yes". Any jQuery/javascript component of **any **payment method needs to be replicated in includes/modules/pages/checkout_one.

17 Feb 2022, 11:34 AM
#2147
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

dbltoe:

The reason I found the version situation was I was trying to duplicate a problem with a customer's site. I tried loading the newer version to see if it made any difference. Still having problems nailing it down. You know how much of a "dog with a bone" I can be on these things.:P

In case anyone else wants to try, here's the scenario. After the site owner said a customer complained that they were getting the wrong item, he contacted me and I found that the latest order made by that person was as a Guest. The customer had created an account a year prior, couldn't remember log in, and just did a guest checkout. When the owner updated the status from pending to processing, it sent out the e-mail BUT, it did not sent out the Guest e-mail with the link to enter your order# etc. It sent an e-mail with a link to his account history from his previous account which did NOT include the latest item (of course).:ohmy:

The account history e-mail link triggered the customer's stored info in their browser and they logged in only to find their latest order NOT there (again, of course) and assumed they were getting the old order versus the new.

I tried duplicating the problem using two test accounts that were created when we (myzencarthost) upgraded the site originally. I ordered the same item for each using the Guest checkout. One received the "correct" e-mail while the other received an e-mail listing the older test order.:ohmy:

Oddly enough, the one giving the incorrect link (https://YOUR_SITE.com/index.php?main_page=account_history_info&order_id=####) had NONE of the formatting normally found with an update email. No logo at the top, border around the text, Copyright at the bottom, etc.

When I checked the confirmation e-mail, it had no formatting either.:ohmy:

AND..... I have not been able to recreate the problem with the two test accounts. Nor, have we gotten any feedback from customers that anything is amiss. All logs were checked to no avail and I continue to scratch my head over this one.

Using guest checkout for the two test accounts has not produced an incorrect e-mail since the very first one

Perhaps someone else has had this or knows a better way to troubleshoot than just continuing to do test checkouts.

THANX
What's the original version of OPC? I'll note that there were issues (can't readily remember when the correction was made) in older versions where the guest-customer record got written with actual customer information.

2 Mar 2022, 8:49 AM
#2148
markau avatar

markau

New Zenner

Join Date:
Oct 2020
Location:
australia
Posts:
31
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Does this work on php 8.1 ? Thanks

2 Mar 2022, 6:04 PM
#2149
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

markau:

Does this work on php 8.1 ? Thanks
I've not yet tested on PHP 8.1, but the current version of Zen Cart supports PHP versions up to 8.0.

2 Mar 2022, 10:33 PM
#2150
markau avatar

markau

New Zenner

Join Date:
Oct 2020
Location:
australia
Posts:
31
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Many thanks

3 Mar 2022, 12:39 AM
#2151
markau avatar

markau

New Zenner

Join Date:
Oct 2020
Location:
australia
Posts:
31
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

I tested on php 8.1, worked very well :smile:

3 Mar 2022, 11:39 AM
#2152
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

markau:

I tested on php 8.1, worked very well :smile:
Thanks for the testing and feedback!

3 Mar 2022, 1:09 PM
#2153
strelitzia avatar

strelitzia

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

There are multiple reasons why the Ajax timeout message could be displayed, so the fact that it's so generic makes tracking an issue a little more difficult.
I made a few modifications so that the timeout message now gives details of what the timeout relates to.

includes/languages/English/checkout_one.php

Find (line 57)

define('JS_ERROR_AJAX_TIMEOUT', 'It\\\'s taking a little longer than normal to update your order\\\'s shipping cost.  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');

Replace with

define('JS_ERROR_AJAX_TIMEOUT', 'It\\\'s taking a little longer than normal to update your order\\\'s details (General Ajax Timeout error).  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');
define('JS_ERROR_AJAX_SHIPPING_TIMEOUT', 'It\\\'s taking a little longer than normal to update your order\\\'s shipping cost.  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');
define('JS_ERROR_AJAX_PAYMENT_TIMEOUT', 'It\\\'s taking a little longer than normal to update your order\\\'s payment method.  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');
define('JS_ERROR_AJAX_SET_ADDRESS_TIMEOUT', 'It\\\'s taking a little longer than normal to set your order\\\'s address.  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');
define('JS_ERROR_AJAX_RESTORE_ADDRESS_TIMEOUT', 'It\\\'s taking a little longer than normal to restore your order\\\'s address values.  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');
define('JS_ERROR_AJAX_VALIDATE_ADDRESS_TIMEOUT', 'It\\\'s taking a little longer than normal to validate your order\\\'s address details.  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');
define('JS_ERROR_AJAX_RESTORE_CUSTOMER_TIMEOUT', 'It\\\'s taking a little longer than normal to restore your customer details.  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');
define('JS_ERROR_AJAX_VALIDATE_CUSTOMER_TIMEOUT', 'It\\\'s taking a little longer than normal to validate your customer details.  Please close this message and try again.\n\nIf you continue to receive this message, please contact us.');

includes/modules/pages/checkout_one/jquery.checkout_one.js

Find (line 471)

 alert( ajaxTimeoutErrorMessage );

Replace with

alert( ajaxTimeoutShippingErrorMessage );

Find (line 639)

 alert( ajaxTimeoutErrorMessage );

Replace with

alert( ajaxTimeoutPaymentErrorMessage );

Find (line 700)

alert(ajaxTimeoutSetAddressErrorMessage);

Replace with

alert( ajaxTimeoutPaymentErrorMessage );

Find (line 796)

alert(ajaxTimeoutSetAddressErrorMessage);

Replace with

alert(ajaxTimeoutRestoreAddressErrorMessage);

Find (line 860)

alert(ajaxTimeoutSetAddressErrorMessage);

Replace with

alert(ajaxTimeoutValidateAddressErrorMessage);

Find (line 959)

alert(ajaxTimeoutSetAddressErrorMessage);

Replace with

alert(ajaxTimeoutRestoreCustomerErrorMessage);

Find (line 959)

alert(ajaxTimeoutSetAddressErrorMessage);

Replace with

alert(ajaxTimeoutValidateCustomerErrorMessage);

includes/modules/pages/checkout_one/jscript_main.php

Find (line 33)

var ajaxTimeoutErrorMessage = '<?php echo JS_ERROR_AJAX_TIMEOUT; ?>';

Add after

var ajaxTimeoutShippingErrorMessage = '<?php echo JS_ERROR_AJAX_SHIPPING_TIMEOUT; ?>';
var ajaxTimeoutPaymentErrorMessage = '<?php echo JS_ERROR_AJAX_PAYMENT_TIMEOUT; ?>';
var ajaxTimeoutSetAddressErrorMessage = '<?php echo JS_ERROR_AJAX_SET_ADDRESS_TIMEOUT; ?>';
var ajaxTimeoutRestoreAddressErrorMessage = '<?php echo JS_ERROR_AJAX_RESTORE_ADDRESS_TIMEOUT; ?>';
var ajaxTimeoutValidateAddressErrorMessage  = '<?php echo JS_ERROR_AJAX_VALIDATE_ADDRESS_TIMEOUT; ?>';
var ajaxTimeoutRestoreCustomerErrorMessage = '<?php echo JS_ERROR_AJAX_RESTORE_CUSTOMER_TIMEOUT; ?>';
var ajaxTimeoutValidateCustomerErrorMessage = '<?php echo JS_ERROR_AJAX_VALIDATE_CUSTOMER_TIMEOUT; ?>';

@lat9, please consider adding these edits to the master file set, if only to save me having to make them every time I do an update to this great module!

3 Mar 2022, 3:32 PM
#2154
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

I've created a tracking issue (https://github.com/lat9/one_page_checkout/issues/312) for the change. Note that my implementation might be a tad different (as always), where I'd split the final common "Please close..." sentence to aid in language translations.

10 Mar 2022, 6:46 PM
#2155
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,685
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

Getting the popup

Please contact the store owner; some required elements of this page are missing.

Looks like
zcLog2Console('Missing '+ottotalSelector);
is firing in includes/modules/pages/checkout_one/jquery.checkout_one.js

The console says
Missing #ottotal > div:first-child

Zen Cart 1.5.7d, Bootstrap template (latest - 3.2.0), One Page Checkout (latest - 2.3.10).

10 Mar 2022, 6:58 PM
#2156
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

swguy:

Getting the popup

Please contact the store owner; some required elements of this page are missing.

Looks like
zcLog2Console('Missing '+ottotalSelector);
is firing in includes/modules/pages/checkout_one/jquery.checkout_one.js

The console says
Missing #ottotal > div:first-child

Zen Cart 1.5.7d, Bootstrap template (latest - 3.2.0), One Page Checkout (latest - 2.3.10).

Could it be this? - Bootstrap Template needs 'Order Total, jQuery Selector' changing in Admin.

10 Mar 2022, 7:13 PM
#2157
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

simon1066:

Could it be this? - Bootstrap Template needs 'Order Total, jQuery Selector' changing in Admin.
:smile: Absolutely!

10 Mar 2022, 7:25 PM
#2158
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,685
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

Many thanks!

10 Mar 2022, 8:08 PM
#2159
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,685
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

Hmm... now the Check/Money Order radio button can't be selected. I'm logged in as a regular customer, and I removed 'moneyorder' from Guest Checkout: Disallowed Payment Methods. This seems to be just cosmetic because if I click "Confirm Order" at the bottom, it goes through.

MoneyOrder is the only payment method available. (I think this is what triggers the problem.)

11 Mar 2022, 1:00 PM
#2160
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

swguy:

Hmm... now the Check/Money Order radio button can't be selected. I'm logged in as a regular customer, and I removed 'moneyorder' from Guest Checkout: Disallowed Payment Methods. This seems to be just cosmetic because if I click "Confirm Order" at the bottom, it goes through.

MoneyOrder is the only payment method available. (I think this is what triggers the problem.)
Is that single payment auto-selected when using the 3-page checkout?