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.
po_number is an additional field in the orders table.
includes/classes/order.php
under function query($order_id)
under function cart()Code:$this->info = array(... 'ip_address' => $order->fields['ip_address'], 'po_number' => $order->fields['po_number'] );
There's also a one-liner in the email section so it adds the po_number to the order confirmation email (irrelevant).Code:$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'] );
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.
@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.
After I open the one-page Checkout plugin, I modify the jump page modification in checkout_shipping and it doesn't work.
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?
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.
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.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095
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?
Simon
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.
Last edited by simon1066; 17 Sep 2019 at 07:09 PM. Reason: correction
Simon
Bookmarks