Forums / PayPal Express Checkout support / Wrong language on Paypal Express Checkout since upgrade to v1.54.

Wrong language on Paypal Express Checkout since upgrade to v1.54.

Views: 4,751

Results 1 to 8 of 8
14 Dec 2015, 3:22 PM
#1
jin_voles avatar

jin_voles

New Zenner

Join Date:
Dec 2015
Location:
Germany
Posts:
3
Plugin Contributions:
0

Wrong language on Paypal Express Checkout since upgrade to v1.54.

Finally did the upgrade from 1.39h to 1.54, which seems to working ok so far apart from a few niggles:

  1. Paypal Express Checkout now defaults to German language even if browser and shop are set to English. I tested this also with a UK proxy and it still came up in German.
    I've set Configuration/Mystore/Language Selector to Browser, and wanted to tweak the paypalwpp.php file as for v1.39 but this file for v1.54 is very different so I've no idea where to start.

How can I get Paypal to always use the browser/ shop language?

  1. Paypal Express checkout no longer displays product names & information, only the total cost.

Any input would be greatly appreciated.
Thanks

Jin

14 Dec 2015, 5:50 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Wrong language on Paypal Express Checkout since upgrade to v1.54.

Have seen something similar to this before:
What languages are installed and what are their id numbers?
What are all of your paypal express settings (obviously don't include credentials)?
What are your settings in modules order totals, including the which are green and their sort order?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Dec 2015, 9:01 PM
#3
jin_voles avatar

jin_voles

New Zenner

Join Date:
Dec 2015
Location:
Germany
Posts:
3
Plugin Contributions:
0

Re: Wrong language on Paypal Express Checkout since upgrade to v1.54.

mc12345678:

Have seen something similar to this before:
What languages are installed and what are their id numbers?
What are all of your paypal express settings (obviously don't include credentials)?
What are your settings in modules order totals, including the which are green and their sort order?

Thank you mc12345678 for your response.

Only default English plus german language installed. Not sure what you mean by id nos?

Paypal express Settings:

Enable this Payment Module
True

Sort order of display.
0

Payment Zone
--none--

Express Checkout Shortcut Button
On

Set Order Status
Payment Received [5]

Set Unpaid Order Status
Pending [1]

Set Refund Order Status
Pending [1]

Express Checkout: Require Confirmed Address
No

Express Checkout: Select Cheapest Shipping Automatically
Yes

Express Checkout: Skip Payment Page
Yes

Express Checkout: Automatic Account Creation
Yes

Payment Action
Final Sale

Transaction Currency
Only EUR

Store (Brand) Name at PayPal

Allow eCheck?
Instant Only

PayPal Page Style
Primary

PayPal Mode
PayPal

Live or Sandbox
live

Debug Mode
Off

Modules istalled:

Tax ot_tax sort order 300

Total ot_total sort order 999

The frustrating thing for me is that I had this language issue before in v1.39h which was resolved by this fix from DrByte https://www.zen-cart.com/showthread.php?106924-PayPal-Express-Checkout-Default-Language.

14 Dec 2015, 9:37 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Wrong language on Paypal Express Checkout since upgrade to v1.54.

Going to take a lap through the proposed previous fix (though think the ONLY EUR is probably the cause), but to address the single total only, if not mistaken need to include the sub-total in order to show each product individually and also in order before the total.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Dec 2015, 11:00 AM
#5
jin_voles avatar

jin_voles

New Zenner

Join Date:
Dec 2015
Location:
Germany
Posts:
3
Plugin Contributions:
0

Re: Wrong language on Paypal Express Checkout since upgrade to v1.54.

Any other offers?

please!

17 Dec 2015, 5:00 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Wrong language on Paypal Express Checkout since upgrade to v1.54.

Given that my testing environment for this is limited, I haven't tested this thoroughly, but I'm offering it as an idea.

Around line 1004 in the paypalwpp.php file you'll see the following section of code.
I'm suggesting adding the highlighted changes as shown:

    $lang_code = '';
    $user_locale_info = array();
    [B]global $lng;[/B]
[B]    $user_locale_info[] = $lng->get_browser_language();[/B]
    if (isset($locales) && is_array($locales)) {
      [B]array_push($user_locale_info, $locales);[/B]
    }

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Jan 2016, 8:53 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Wrong language on Paypal Express Checkout since upgrade to v1.54.

Actually, my previous post was wrong.
This works better:

    $lang_code = '';
    $user_locale_info = array();
    if (isset($locales) && is_array($locales)) {
      $user_locale_info = $locales;
    }
[B]    global $lng;
    array_unshift($user_locale_info, $lng->get_browser_language());
[/B]    $user_locale_info[] = strtoupper($_SESSION['languages_code']);

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Oct 2016, 10:02 AM
#8
vincent_sanvinna avatar

vincent_sanvinna

New Zenner

Join Date:
Oct 2016
Posts:
1
Plugin Contributions:
0

Re: Wrong language on Paypal Express Checkout since upgrade to v1.54.

DrByte:

Actually, my previous post was wrong.
This works better:

$lang_code = '';
$user_locale_info = array();
if (isset($locales) && is_array($locales)) {
  $user_locale_info = $locales;
}

[B] global $lng;
array_unshift($user_locale_info, $lng->get_browser_language());
[/B]
$user_locale_info[] = strtoupper($_SESSION['languages_code']);


My Zencart is 1.54. I faced the same problem. After I edited the paypalwpp.php as mentioned in your post, the customer cannot land on Paypal login page any more after he confirms the order. Is there any further solution to this? 

Thank you!