Forums / Built-in Shipping and Payment Modules / Paypal Express default select the cheapest method regardless the customers' selection

Paypal Express default select the cheapest method regardless the customers' selection

Views: 1,226

Results 1 to 4 of 4
15 Nov 2013, 8:14 PM
#1
kagaroo avatar

kagaroo

New Zenner

Join Date:
Nov 2013
Location:
New York
Posts:
30
Plugin Contributions:
0

Paypal Express default select the cheapest method regardless the customers' selection

I were running a testing Zen-Cart 1.39 site with Paypal IPN as a payment method. This site was running smoothly and with correct calculations for the payment. A few weeks ago, I decided to upgraded to Zen-Cart 1.51. After upgrade, Paypal IPN can not grab the shipping charge. I searched our forum for the similar problem and decided to switch to Paypal Express-checkout. The good thing about Express-checkout is that it does give all detail lines about the transaction. However, regarless which shipping method during checkout, it always chooses the cheapest shipping method.

I did search the forum and turned off the cheapest shipping default setting in the Paypal Express payment module in admin. That did not solve the problem. Wire Trasfer payment module can display correctly.

I check the header.php of checkout_shipping. There is a code:

if ( !$_SESSION['shipping'] || ( $_SESSION['shipping'] && ($_SESSION['shipping'] == false) && (zen_count_shipping_modules() > 1) ) ) $_SESSION['shipping'] = $shipping_modules->cheapest();

No matter what customer choose, the condition inside "if " is always true. I have several shipping modules installed which can display correctly in shipping estimator as well as checkout_shipping. I suspected this problem arised when the selected shipping information was not properly saved in session during checkout, or the information was not transferred to Paypal properly or there was a change in system itself or code mess up during upgrade (my fault).

It has been several days, This problem has still not been solved. Therefore, I would like someone in the forum shed some light on this issue. Thank you!

Zen-cart version: 1.39 upgraded to 1.51
Database Patch Level: 1.51
PHP Version: 5.2.17 (Zend: 2.2.0)
Database: MySQL 5.5.34
custom: checkout_payment was merged into checkout_shipping to make a faster checkout process, same was its header.php.

If you need more information, please let me know.

15 Nov 2013, 8:52 PM
#2
kagaroo avatar

kagaroo

New Zenner

Join Date:
Nov 2013
Location:
New York
Posts:
30
Plugin Contributions:
0

Re: Paypal Express default select the cheapest method regardless the customers' selection

Forgot to mention a few thing in the initial post:

The Paypal Express icon was disable in shoppping cart page. Therefore, customers have to log into this site and choose the shipping and payment information before going to Paypal.

When I used wire transfer module, the shipping charge was calculated corrrectly based on my selection( which may imply this problem may exist with Paypal Express).

18 Nov 2013, 12:44 AM
#3
kagaroo avatar

kagaroo

New Zenner

Join Date:
Nov 2013
Location:
New York
Posts:
30
Plugin Contributions:
0

Re: Paypal Express default select the cheapest method regardless the customers' selection

Just want to give everyone an update.

Finally, I figured it out myself. The cause of the problem is that my custom header_php.php for checkout_shipping has a code to bypass the shipping information for the Paypal Express Checkout. Therefore, no shipping method will be used for Paypal Express and customer will automatically get the cheapsest shipping by default based on the code for Paypal Express. When I deleted this extra code, customers can go through normal checkout with the selected shipping method. Everything is good for now. Thank you!

18 Nov 2013, 7:45 AM
#4
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Paypal Express default select the cheapest method regardless the customers' selection

Glad you figured it out, and have it working now. Also thank you for giving the feedback of the solution, so that it may help others