Jump to content

PayPalAPI locale


mark2

Recommended Posts

To have the paypal page in the locale associated with the country of billing:

Add the following to the start of the makeCall function in the paypallib.php file.

This gives the user a chance to choose their language.

I'm using Prestashop 1.2.5 with a more recent version of the paypalapi module.

    public function makeCall($host, $script, $methodName, $string)
   {
           global $cookie;
       // Getting address
       if (isset($cookie->id_cart) AND $cookie->id_cart)
           $cart = new Cart(intval($cookie->id_cart));
       if (isset($cart->id_address_invoice) AND $cart->id_address_invoice)
           $address = new Address(intval($cart->id_address_invoice));
       $lc = "FR";
       if (Validate::isLoadedObject($address)) {
         $country = new Country(intval($address->id_country));
         $lc = $country->iso_code;
       }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...