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

One-Page Checkout [Support Thread]

Views: 629,524

Results 1,341 to 1,360 of 3,078
5 Sep 2019, 1:28 PM
#1341
lat9 avatar

lat9

Administrator

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

One-Page Checkout [Support Thread]

lat9:

@balihr, you've done all the right things from an OPC perspective (although I don't believe that you need that alteration to the OPC observer).

Your template change adds the data-gathering for that PO number and the change you made to the confirmation page's header records that value in the session prior to the session-hash value being created. That's why you don't need that OPC observer change as those 'unsets' deal with order-totals and payment- or shipping-modules that modify their session values during order creation.

What additional processing is being performed if a PO number is supplied for the order?
Another thought, when you indicate that the order has no shipping address, is that based on the order's view in either the customer's account-history-info and/or the admin's order-details display ... or is there no information recorded in the database?

5 Sep 2019, 11:13 PM
#1342
balihr avatar

balihr

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

lat9:

@balihr, you've done all the right things from an OPC perspective (although I don't believe that you need that alteration to the OPC observer).

This seems to be required. If I remove the modification from the observer, I keep getting "Your order's details have changed. Please review the current values and re-submit." even when I change nothing. So, I log in, go to checkout, keep the cheapest pre-selected shipping option and only click PayPal and then the submit button, and I get that error message. The only thing that prevents that error message from showing up is the unset in the hashSession function.

lat9:

What additional processing is being performed if a PO number is supplied for the order?
po_number is an additional field in the orders table.

includes/classes/order.php
under function query($order_id)

$this->info = array(...
'ip_address' => $order->fields['ip_address'],
'po_number' => $order->fields['po_number']
);

under function cart()

$this->info = array(...
'comments' => (isset($_SESSION['comments']) ? $_SESSION['comments'] : ''),
'po_number' => (isset($_SESSION['po_number']) ? $_SESSION['po_number'] : ''),
'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR']
);

There's also a one-liner in the email section so it adds the po_number to the order confirmation email (irrelevant).

lat9:

Another thought, when you indicate that the order has no shipping address, is that based on the order's view in either the customer's account-history-info and/or the admin's order-details display ... or is there no information recorded in the database?
Actually, all 3 is correct, but primarily because of the last one you mentioned - no information in database. The delivery_XXXXX fields in the orders table are all empty, and what I also find very interesting is that delivery_address_format_id is set to 0 (expected value is 2 for US orders).

Also interesting - it only happens with PayPal Express. At first, I thought it was related to the Express shortcut button, but we eliminated that option when we disabled the shortcut button and the issue was still happening. So, the customer does enter OPC and uses PayPal Express when this happens. PayPal Pro doesn't seem to be affected. Also, it's only Guest Checkout when it happens, haven't seen it happen with a regular account checkout.

One thing I should point out - possibly very important - the po_number field doesn't even show up for these customers. You probably noticed the if($check_flag_group) - there's an additional query to check if the customer belongs to a group, and if true, the po_number field will be displayed. Otherwise, that field doesn't show and isn't part of the form at all.

6 Sep 2019, 11:44 AM
#1343
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

@balihr, is it possible for you to turn on the PPE payment method's debug-logging in an attempt to hone in on the root cause of the issue(s) you're having? That way, if a future order comes back with that empty delivery address, you'd have information to send me.

6 Sep 2019, 4:16 PM
#1344
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

After I open the one-page Checkout plugin, I modify the jump page modification in checkout_shipping and it doesn't work.

Attachment 18643

Can the plugin control the page that jumps?
I just want to click the checkout button on the shopping cart page, the customer will jump directly to the registration page if they are not logged in.
Close the one-page Checkout payment plug-in to modify the judgment of the above screenshot to achieve my idea, but after opening one-page Checkout plug-in, skip to the login page.
Can the plugin directly control the jump page? Which file code do I need to modify?

15 Sep 2019, 12:59 PM
#1345
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

I'm preparing v2.1.4 of One-Page Checkout and will post back here once I've submitted the update for the Zen Cart moderators' review. There have been various reports over the past year of orders being received with empty shipping addresses for orders placed with PalPal Express Checkout/PPEC (paypalwpp) and I believe that this update will correct those issues.

The Scenario

A customer (either a guest or an account-holder that chooses to use a temporary shipping address) enters their address-related information, selects PPEC as their payment method and, upon order confirmation, is taken to the PayPal site. After logging in to PayPal, either their preferred PayPal address is different from that entered on the Zen Cart store or they choose a different shipping address from their PayPal address book and return to the store for order fulfillment.

This confuses OPC, causing part of its processing to believe that it should not use the temporary shipping address stored prior to the transition to PayPal. That, in turn, causes OPC's order-address update to register an empty shipping address.

The Correction

OPC's processing, for v2.1.4 and later, is now more integrated with the PPEC payment method and has tightened its temporary addresses' handling. Specifically, on return from PayPal, if a temporary shipping address is currently being used, OPC inspects the shipping-address returned. If it's *different *from that submitted to PayPal, the original shipping address is saved and the order's shipping address is updated with that returned by PayPal.

Additionally, OPC now checks to see if the order's value has changed upon return from PayPal, as a change in shipping address could result in a change in tax-rate. If such a change is detected, OPC will redirect the customer back to its data-entry page for an additional confirmation prior to order submittal to PayPal.

Finally, if the order's temporary shipping address was changed at PayPal, OPC will append a statement to the order's first status-history record identifying the as-entered address ... just to let the customer know.

The Workaround

There is, unfortunately, no easy workaround for this issue. The best 'workaround' is to update your store to One-Page Checkout v2.1.4 or later. Additional possibilities exist, but they depend on a store's configuration:

  1. If the store uses only non-PPEC payment methods, then this issue does not apply (you should still plan to update to v2.1.4 for additional bugfixes).

  2. If the store uses only PPEC for credit card payments, the only viable workaround is to disable OPC until the OPC v2.1.4 update.

  3. If the store uses a combination of PPEC and other credit-card providers (including PayPal Payments Pro), disable PPEC until the OPC v2.1.4 update.

15 Sep 2019, 1:33 PM
#1346
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

v2.1.4 has been submitted for Zen Cart moderator review; I'll post back when it's available for download.

 This release contains changes associated with the following  GitHub issues.  Note that there is an additional core-file update  required for store's running a version of Zen Cart *prior to* v1.5.6!

#208: Display messages stacked for checkout on the main date-entry page.
#209: zc157 future-proofing, use zen_get_countries_name to retrieve the name of a country rather than direct database retrieval.
#210: Guest checkout, redirect billing/shipping address change back to the main data-entry page.
#211: Correct empty shipping address sometimes recorded on orders placed via PayPal Express Checkout.
#212: Correct temporary-address tax-calculations; affects ot_loworder_fee and ot_cod_fee and possibly others.

17 Sep 2019, 12:47 PM
#1348
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

With the latest release of v2.1.4, function_taxes.php is located under the zc156b folder. Should it not be under the zc155f folder?

17 Sep 2019, 5:10 PM
#1349
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

simon1066:

With the latest release of v2.1.4, function_taxes.php is located under the zc156b folder. Should it not be under the zc155f folder?
Nope, it's the zc156b version of the file; the installation/upgrade instructions point to that file.

17 Sep 2019, 6:04 PM
#1350
simon1066 avatar

simon1066

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

lat9:

Nope, it's the zc156b version of the file; the installation/upgrade instructions point to that file.

Ok I see the Github instructions do say that. It was just that the Change History tab says

/zc155f/includes/functions/functions_taxes.php (Added)

Note: Stores running a version of Zen Cart prior to v1.5.6 should copy this file to their store's /includes/functions sub-directory.
17 Sep 2019, 6:23 PM
#1351
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

simon1066:

Ok I see the Github instructions do say that. It was just that the Change History tab says
Thanks, I'll get the docs updated the next go-round.

18 Sep 2019, 5:17 AM
#1352
jboyjw avatar

jboyjw

New Zenner

Join Date:
Aug 2019
Posts:
5
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Is there a demo site or screenshots of what the One-Page Checkout looks like? We're upgrading to 1.5.6 and would rather not figure out how get the old COWOA plugin to work with 1.5.6... So I'd love to sell my client on using this One-Page Checkout, but I need to give them a feel of what the updated layout will look like. Thanks.

18 Sep 2019, 8:06 AM
#1353
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]

The demo site is located at https://vinosdefrutastropicalesDOTcom/demo. You can guest checkout some item to get a quick view.
Remember that, as in all things open source, you can make it "look" any way you want.

18 Sep 2019, 11:16 AM
#1354
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

dbltoe:

The demo site is located at https://vinosdefrutastropicalesDOTcom/demo. You can guest checkout some item to get a quick view.
Remember that, as in all things open source, you can make it "look" any way you want.
Additional documentation, over-and-above that in the readme, is also online at the OPC GitHub repository: https://github.com/lat9/one_page_checkout/.

Just click the links associated with "Storefront Considerations" and/or "Admin Considerations" and follow the included links for additional documentation and screenshots.

18 Sep 2019, 1:33 PM
#1355
jboyjw avatar

jboyjw

New Zenner

Join Date:
Aug 2019
Posts:
5
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Perfect, thank you both. I had clicked on the Storefront Considerations page but didn't click further, didn't realize there were screenshots there. :) Cheers.

1 Oct 2019, 7:00 PM
#1356
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

I've just submitted v2.1.5 of One-Page Checkout to the Zen Cart moderators for review and will post back here when it's available for download.

 This release contains changes associated with the following GitHub issues:

#213: Use 'TEXT_OPTION_DIVIDER' when displaying the shopping-cart.
#214: Correct 'zen_get_tax_locations' override when guest's billing=shipping.
#215: Use 'zen_is_logged' in when checking customer login status on the checkout_one_confirmation page.
#216: Enable integration with Gateway Processing Services (gps) payment method.

2 Oct 2019, 2:49 PM
#1357
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've just submitted v2.1.5 of One-Page Checkout to the Zen Cart moderators for review and will post back here when it's available for download.

 This release contains changes associated with the following GitHub issues:

#213: Use 'TEXT_OPTION_DIVIDER' when displaying the shopping-cart.
#214: Correct 'zen_get_tax_locations' override when guest's billing=shipping.
#215: Use 'zen_is_logged' in when checking customer login status on the checkout_one_confirmation page.
#216: Enable integration with Gateway Processing Services (gps) payment method.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095

5 Oct 2019, 8:56 PM
#1358
balihr avatar

balihr

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

Interesting "bug" with Guest Checkout - when using Chrome autofill, you just enter your email address and Chrome fills everything else, allowing Billing Address to become visible at the same time as Contact Information. If you click the "Save" button for the billing address, billing address gets saved, but contact information doesn't and is reset to blank. Extremely confusing.

My workaround was to disable the billing "save" button if the contact "save" is visible by modifying the saveBilling() function:
includes/modules/pages/checkout_one/jquery.checkout_one.js

if (jQuery('#checkoutOneGuestInfo .opc-buttons').is(":visible")) {
            alert('Please save your Contact Information first. Thank you!');
            jQuery('#checkoutOneGuestInfo .opc-buttons #opc-guest-save .cssButton').css({ border: "2px solid red" });
            jQuery("body,html").animate(
                {
                  scrollTop: $("#checkoutOneGuestInfo .opc-buttons #opc-guest-save .cssButton").offset().top
                },
                800 //speed
              );
            
        } else {
            saveAddressValues('bill', '#checkoutOneBillto');
        }

This is a bull in a china shop type of solution, and definitely still confusing because it clears the billing details after saving contact details, but it's better than nothing - at least there was a warning indicating you need to save contact details first...

Would there happen to be a Cindy-style (beautiful) solution? :smile:

5 Oct 2019, 9:53 PM
#1359
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

@balihr, try this. Edit your copy of /includes/classes/OnePageCheckout.php, finding the formatAddressElement method and apply the following changes:

    public function formatAddressElement($which, $field_name, $field_value, $field_text, $db_table, $db_fieldname, $min_length, $placeholder)
    {
        $this->inputPreCheck($which);
        
        $field_id = str_replace('_', '-', $field_name) . "-$which";
        $field_name .= "[$which]";
        $field_len = zen_set_field_length($db_table, $db_fieldname, '40');
        $field_required = (((int)$min_length) > 0) ? ' required' : '';
        [B]$autocomplete = ($this->guestIsActive && empty($this->customerInfoOK)) ? 'autocomplete="off"' : '';[/B]
        
        return
            '<label class="inputLabel" for="' . $field_id . '">' . $field_text . '</label>' . PHP_EOL .
            zen_draw_input_field($field_name, $field_value, "$field_len id=\"$field_id\" placeholder=\"$placeholder\" $field_required[B] $autocomplete[/B]") . PHP_EOL .
            '<br class="clearBoth" />';
    }

Don't forget the space between $field_required and $autocomplete!

6 Oct 2019, 8:52 AM
#1360
balihr avatar

balihr

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

Thank you!

Close, but... This disables autofill on the billing address, forcing the customer to type it, which is quite bad for those who are used to using autofill. It does work on Contact Information, you save it but then all other billing fields need to be populated manually.
BTW, autocomplete="off" is ignored by Chrome (see SO) so I put autocomplete="new-password"

If you manually fill in the form and jump inputs using Tab key, you can get to billing address and type in your name and remove the overlay.

I think the perfect scenario would be to keep the overlay active until Contact Information is saved. Is that possible?