Jump to content

PayPal Module - language setting of PDF invoice??


Recommended Posts

Hi everybody,

We are using Prestashop in two languages (German/English). When the buyer uses the payment via PayPal the language of the PDF invoice (sent automatically with the order confirmation) is always German, no matter if the buyer uses a German or English checkout in our shop. We have checked everything in the PayPal sandbox using different buyers from different countries, however the invoice language remains German.

How can we configure the AUTOMATIC email PDF invoice (not the one in the backend or in the customer area!) to be German for the German buyers and English for the English buyers.

Your input is much appreciated!!

Link to comment
Share on other sites

Here is code of choosing Language of PDF in file /classes/PDF.php (PS 1.3x)

       if (!isset($cookie) OR !is_object($cookie))
           $cookie->id_lang = intval(Configuration::get('PS_LANG_DEFAULT'));
       self::$_iso = strtoupper(Language::getIsoById($cookie->id_lang));



The language is store default language or language in $cookie.
But I think because the invoice is generated when order is confirmed by Paypal, the user is Paypal Server, I don't there is any language in $cooie, that's why you always got default language.

Please try to modify above code to get language from database ps_cart table
Hope this helps

Link to comment
Share on other sites

  • 10 months later...

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...