AbanteCart Community
Shopping Cart Operations => Support => Extension Support => Topic started by: sharon on July 15, 2014, 06:30:25 PM
-
I'm having problems with PayPal Express Checkout and weight based shipping. I am currently using the Paypal Sandbox Test environment
Case 1
All is OK when I use Paypal Express via the route
1. View Cart
2. Checkout button
3. Guest Checkout option
4. Guest Checkout Step 2 Page - This displays all shipping options correctly.
Case 2
However when I use the Paypal Express button from anywhere (for example on the view cart page) and complete the paypal payment screen, on return to
the Guest Checkout - Step 2 Page I get the error message
Error: No Shipping Options available.
The correct procesing of the Case 1 shows that the locations/zones/weights are set correctly.
In trying to debug this, I note that the SQL for selecting the zone_to_locations is different in the two cases as follows
Debug log
/var/www/html/shop/core/engine/extensions.php LIne 821
Case 1
SELECT * FROM zones_to_locations WHERE location_id = '4' AND country_id = '222' AND (zone_id = '3534' OR zone_id = '0')
(where 222 is UK and zone_id 3534 is a correct the county for the address)
Case 2
SELECT * FROM zones_to_locations WHERE location_id = '2' AND country_id = '222' AND (zone_id = '0' OR zone_id = '0')
(where we have zone_id = 0 on both selections. There is no zone_id 0 setup in the tables)
I am presuming that the zone_id is not getting picked up correctly on return from paypal express processing and hence no shipping options can be found.
Could you shed any light on this as to a way forward for me.
Thanks
-
Hello.
in CASE 2 shipping address used from PayPal account (because you skip shipping section). Make sure address entered on PayPal side is same with shipping address from CASE 1.
Say you have configured Weight Based shipping to work with UK only and in paypal account you have USA address (or incorrect UK). in case 2 if you skip shipping methods selection and go directly to PayPal - then USA address (or incorrect UK) used for shipping and Weight Based shipping can not be applied.
If You think that this is a bug please report we will try to find solution.
Please post more details if possible: address from case1 and case 2 (PayPal side address)
-
Hi,
On futher investigation I think it maybe a bug as the addresses used on both the guest login and the paypal side are the same.
To try and debug a little I put a debug statment in the program shop/extensions/paypal_express_checkout/storefront/model/extension/paypal_express_checkout.php at line 51. as follows
$var= "ADDRESS KEYS:".print_r(array_keys($address),true)." ADDRESS VALUES: ".print_r(array_values($address),true);
ADebug::checkpoint($var);
and then ran Case 1 and Case 2 and captured the results from the Checkout Step 2 screen.
The attachments show - the paypal addresses and checkout screens and the results for the debug statment for case 1 (guest checkout) and case 2 (paypal express) . In the debug addresses, the zone, zone_code and country_id are the same but in case 2 there is no zone_id.
Thanks for your quick response.
-
can you replace file public_html/extensions/paypal_express_checkout/storefront/controller/responses/extension/paypal_express_checkout.php
and test is zone adds to address?
-
Thanks for the program. installed it as requested, cleared all cache (browser and AbanteCart) but the error is still occuring.
On return to step 2 from paypal express checkout the address still has the zone_id as blank - See attached address dump.
Thanks
Sharon
-
I am using Paypal standard, and i think there is no IPN URL, and order payment cant return, so I install paypal express.
but when I getting 2 orders and using Weight Based Shipping.
It seems the shipping country isnt return or pass correctly. My store location is set to Hong Kong.
and both orders are from USA.
But in the order detail, there is indicated with Hong Kong country shipping, but invoice shipping address is USA.
This is nightmare for both paypal standard / express having this issue.
Please tell me how to fixed it.
-
Just more information
you can see the address and shipping country are different