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

One-Page Checkout [Support Thread]

Views: 629,552

Results 1,601 to 1,620 of 3,078
28 Apr 2020, 6:27 PM
#1601
swguy avatar

swguy

Administrator

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

One-Page Checkout [Support Thread]

I'm not super strong on this; it's just a suggestion. The reason this came up is that I had to fix the salutation stuff in OPC, which I could have avoided if it had been possible to just redirect to the default page. No worries.

1 May 2020, 6:28 AM
#1602
dbltoe avatar

dbltoe

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

Testing OPC on 1.5.7 alpha with 7.3 PHP and 5.6 MySQL

No mods touching core in the site and Guest Checkout gives the hesitation when clicking Checkout and the message "Please contact the store owner; some required elements of this page are missing.".

I get the same missing #otshipping that folks were getting two years ago. The fix is incorporated in OPC in use.

Between too many hours at this and my trifocals, what might I have missed?

1 May 2020, 11:22 AM
#1603
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

dbltoe:

Testing OPC on 1.5.7 alpha with 7.3 PHP and 5.6 MySQL

No mods touching core in the site and Guest Checkout gives the hesitation when clicking Checkout and the message "Please contact the store owner; some required elements of this page are missing.".

I get the same missing #otshipping that folks were getting two years ago. The fix is incorporated in OPC in use.

Between too many hours at this and my trifocals, what might I have missed?
I haven't had a chance to test any zc157 interoperations. Would you open an issue on OPC's GitHub for tracking (https://github.com/lat9/one_page_checkout%29?

1 May 2020, 12:08 PM
#1604
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

lat9:

I haven't had a chance to test any zc157 interoperations. Would you open an issue on OPC's GitHub for tracking (https://github.com/lat9/one_page_checkout%29?
I can now verify that I've replicated @dbltoe's issue on zc157. No good deed goes unpunished; this is a direct result of this Zen Cart PR that corrects the ot_shipping module's previous behavior (where it registered itself during class-construction rather than during the 'process' method).

1 May 2020, 12:23 PM
#1605
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

lat9:

I can now verify that I've replicated @dbltoe's issue on zc157. No good deed goes unpunished; this is a direct result of this Zen Cart PR that corrects the ot_shipping module's previous behavior (where it registered itself during class-construction rather than during the 'process' method).
Correction posted to GitHub: https://github.com/lat9/one_page_checkout/issues/251

I'll wait to see what other gremlins are lurking before committing the OPC v2.3.2 release (this will, BTW, be the minimum version required for zc157 interoperation).

1 May 2020, 4:49 PM
#1606
dbltoe avatar

dbltoe

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

Works just fine. Got some problems with undefined PayPal and GV constants but I don't see any more problems with OPC and 1.5.7

THANX

1 May 2020, 4:59 PM
#1607
swguy avatar

swguy

Administrator

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

Re: One-Page Checkout [Support Thread]

Thanks folks for helping us get ready for the 1.5.7 release!

4 May 2020, 10:01 PM
#1608
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,773
Plugin Contributions:
20

Re: One-Page Checkout [Support Thread]

I know this is a stupid thing to do, but...

Using vanilla 1.5.6c with OPC 2.3.1, php 7.3.17 and PayPal Pro (sandbox activated). I go to checkout, enter CC details and click Confirm Order, give it 3-4 seconds and hit F5 on my keyboard. It takes me back to checkout page (checkout_one) BUT the order actually goes through and is recorded in the admin. If I attempt to go through checkout again, I get a blank screen:

[04-May-2020 21:48:04 UTC] Request URI: /ajax.php?act=ajaxOnePageCheckout&method=updateShipping, IP address: 93.140.231.145
#1  trigger_error() called at [/var/www/vhosts/XYZ/includes/classes/OnePageCheckout.php:956]
#2  OnePageCheckout->setTempShippingToBilling() called at [/var/www/vhosts/XYZ/includes/classes/ajax/zcAjaxOnePageCheckout.php:56]
#3  zcAjaxOnePageCheckout->updateShipping() called at [/var/www/vhosts/XYZ/ajax.php:85]
--> PHP Fatal error: Invalid access; $_SESSION['billto'] is not set. in /var/www/vhosts/XYZ/includes/classes/OnePageCheckout.php on line 956.

The same action actually allows you to go through checkout again in OPC 2.2.0 (duplicate order) and I'm really glad to see it fixed, however... Is it possible to completely block any and all customer interaction while processing checkout? Ideally, block their mouse, keyboard and (F it) even their washing machine in the basement... The only thing that would be allowed is to flip the power switch... :D

5 May 2020, 5:47 AM
#1609
gernot avatar

gernot

Zen Follower

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

Re: One-Page Checkout [Support Thread]

I wonder what method of stopping F5 (or Ctrl-F5) for POST requests (to clear $_POST I presume) was used.
I am also checking OPC on my test site now, and can experiment there.

As I understand it, the basic way is to perform a redirect to the same page after submitting the form:
https://en.wikipedia.org/wiki/Post/Redirect/Get
https://stackoverflow.com/questions/722547/avoiding-form-resubmit-in-php-when-pressing-f5
https://wordpress.org/support/topic/problems-with-form-front-end-when-pressing-refresh-page-f5/

There is also a JavaScript way using window.history.replaceState, or by setting as session variable:
https://stackoverflow.com/questions/6320113/how-to-prevent-form-resubmission-when-page-is-refreshed-f5-ctrlr

More on using JavaScript for this:
https://www.sitepoint.com/community/t/how-to-solve-refresh-page-problem/41523/10

A tutorial using various way:
https://makitweb.com/prevent-page-from-submit-on-refresh-in-php/

5 May 2020, 11:22 AM
#1610
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

ZC v1.56c
OPC v2.3.1

Not sure if this is a thing or that I'm getting a bit befuddled by all the testing I've been doing but,

Checking out as a guest, on the checkout success page the first thing the customer sees is an option to create an account (followed by the html language text and lastly the order details - which in this case contains download links). If they create an account before scrolling down they go to the create account success page so losing any of the order information on screen.

It seems I have two options.

  • Have some text on the create account success page to indicate that the customer can view their order details in My Account - but only for guests that have created an account as part of the Guest checkout process.
  • more simply, move the create account guest option to the bottom of the page, below the order details on the checkout success page.
5 May 2020, 7:25 PM
#1611
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

simon1066:

ZC v1.56c
OPC v2.3.1

Not sure if this is a thing or that I'm getting a bit befuddled by all the testing I've been doing but,

Checking out as a guest, on the checkout success page the first thing the customer sees is an option to create an account (followed by the html language text and lastly the order details - which in this case contains download links). If they create an account before scrolling down they go to the create account success page so losing any of the order information on screen.

It seems I have two options.

  • Have some text on the create account success page to indicate that the customer can view their order details in My Account - but only for guests that have created an account as part of the Guest checkout process.
  • more simply, move the create account guest option to the bottom of the page, below the order details on the checkout success page.
    I could add a message for display on the 'create-account-success' page when the account is created by a guest, letting them know that they can view their just-placed order by navigating to their account-history page. Would that work?
6 May 2020, 8:29 AM
#1612
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

lat9:

I could add a message for display on the 'create-account-success' page when the account is created by a guest, letting them know that they can view their just-placed order by navigating to their account-history page. Would that work?

Thank you for looking at this @lat9. In my case I'm actually happy with moving the create account fields below the html language file text - which I've done.

I think that normally the placement wouldn't be an issue but for my products with downloads there's a need for the customer to read the descriptive text before they leave the checkout success page.

10 May 2020, 1:38 PM
#1613
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

ZC v1.56c
OPC v2.3.1

Not sure if this is OPC related but it is related to guest checkout so I'll go ahead

  1. The order confirmation email sent to the customer has a link to the order_status page - great.

  2. If I update the order then the order update email contains a detailed invoice link to the account_history_info page - which is no good as the customer doesn't have an account.

So it seems that an order update sent to a Guest needs to include #1 not #2, not sure if there's something clever in Admin that will allow this.

10 May 2020, 4:49 PM
#1614
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

simon1066:

ZC v1.56c
OPC v2.3.1

Not sure if this is OPC related but it is related to guest checkout so I'll go ahead

  1. The order confirmation email sent to the customer has a link to the order_status page - great.

  2. If I update the order then the order update email contains a detailed invoice link to the account_history_info page - which is no good as the customer doesn't have an account.

So it seems that an order update sent to a Guest needs to include #1 not #2, not sure if there's something clever in Admin that will allow this.
@simon1066, thanks for the report. I've created a GitHub issue to track the change required.

11 May 2020, 11:29 AM
#1615
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

lat9:

@simon1066, thanks for the report. I've created a GitHub issue to track the change required.
... and now that I've done that, I find that the 'as-shipped' Zen Cart orders.php doesn't include such a link.

What plugins do you have installed that 'participate' in orders' updates?

11 May 2020, 1:25 PM
#1616
gernot avatar

gernot

Zen Follower

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

Re: One-Page Checkout [Support Thread]

Hi @lat9

Some feedback from my translations.
I noticed that the language files for ot_coupon.php, ot_gv.php, and checkout_confirmation.php are from pretty old versions of ZC. Probably good to include modified versions from the latest 1.5.6c.
In particular, checkout_confirmation has some old text about out of stock items that can be put on backorder. As I understand it this is now in the main english.php file.
Hope I did not mess up something and get this wrong.

11 May 2020, 2:09 PM
#1617
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

lat9:

... and now that I've done that, I find that the 'as-shipped' Zen Cart orders.php doesn't include such a link.

What plugins do you have installed that 'participate' in orders' updates?

Oh. I hadn't realised the link was non-stock. I can't think of a plugin off hand. I'll do some digging and get back.

11 May 2020, 3:24 PM
#1618
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

lat9:

... and now that I've done that, I find that the 'as-shipped' Zen Cart orders.php doesn't include such a link.

What plugins do you have installed that 'participate' in orders' updates?

Not sure but I don't think that the orders.php is where we should be looking. The account_history_info link in the order update email is generated in includes/functions/functions_osh_update.php, starting line #116 - I believe this (and more?) code was moved out of orders.php in ZCv1.56

 //send emails
                $email_text =
                    STORE_NAME . ' ' . OSH_EMAIL_TEXT_ORDER_NUMBER . ' ' . $orders_id . "\n\n" .
                    OSH_EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, "order_id=$orders_id", 'SSL') . "\n\n" .
                    OSH_EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($osh_info->fields['date_purchased']) . "\n\n" .
                    strip_tags($email_message) .
                    $status_text . $status_value_text .
                    OSH_EMAIL_TEXT_STATUS_PLEASE_REPLY;
           
                $html_msg['EMAIL_CUSTOMERS_NAME']    = $osh_info->fields['customers_name'];
                $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = OSH_EMAIL_TEXT_ORDER_NUMBER . ' ' . $orders_id;
                $html_msg['EMAIL_TEXT_INVOICE_URL']  = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, "order_id=$orders_id", 'SSL') .'">' . str_replace(':', '', OSH_EMAIL_TEXT_INVOICE_URL) . '</a>';
                $html_msg['EMAIL_TEXT_DATE_ORDERED'] = OSH_EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($osh_info->fields['date_purchased']);
                $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($email_message);
                $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace("\n", '', $status_text);
                $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace("\n", '', $status_value_text);
                $html_msg['EMAIL_TEXT_NEW_STATUS'] = $new_orders_status_name;
                $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace("\n", '', OSH_EMAIL_TEXT_STATUS_PLEASE_REPLY);
                $html_msg['EMAIL_PAYPAL_TRANSID'] = '';
                
11 May 2020, 3:43 PM
#1619
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

... and on a slightly related note, I've now noticed I have osh_updated_by_functions.php in MY_STORE/includes/functions/extra_functions

That's one of your files @lat9, not really sure how it got there other than it seems part of your Orders Status History mod. I couldn't find the file in any of my plugin archives and had to resort to Google to find out what it was.

I don't know if it's being used by my site, I trust it's ok for me to delete it?

11 May 2020, 4:30 PM
#1620
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

simon1066:

... and on a slightly related note, I've now noticed I have osh_updated_by_functions.php in MY_STORE/includes/functions/extra_functions

That's one of your files @lat9, not really sure how it got there other than it seems part of your Orders Status History mod. I couldn't find the file in any of my plugin archives and had to resort to Google to find out what it was.

I don't know if it's being used by my site, I trust it's ok for me to delete it?

Never mind, it does look as though it's a remant of the 'Orders Status History - Updated By' plugin whose function was incorporated into ZCv1.56 last year.