al_foto Posted April 9, 2013 Share Posted April 9, 2013 My site is available in Spanish and english, Prestashop is 1.5.2 and Paypal module 3.4, my Paypal account is set to Spain. Customers from other countries when selecting Paypal are redirected to Paypal in spanish, I need Paypal in their own country language or at least in english. How can I change this ? Please, it's a bit urgent because I'm loosing sales due to this problem, thanks. Link to comment Share on other sites More sharing options...
al_foto Posted April 9, 2013 Author Share Posted April 9, 2013 Solved ?? First I have updated to Paypal version 3.4.8 After a lot of hours and retries I have found that changing the file paypal_lib.php in the api subfolder of the module, where it says: $params = array( 'METHOD' => $methodName, 'VERSION' => $method_version, 'PWD' => Configuration::get('PAYPAL_API_PASSWORD'), 'USER' => Configuration::get('PAYPAL_API_USER'), 'SIGNATURE' => Configuration::get('PAYPAL_API_SIGNATURE') ); to $params = array( 'METHOD' => $methodName, 'VERSION' => $method_version, 'PWD' => Configuration::get('PAYPAL_API_PASSWORD'), 'USER' => Configuration::get('PAYPAL_API_USER'), 'SIGNATURE' => Configuration::get('PAYPAL_API_SIGNATURE'), 'LOCALECODE' => 'en_US' ); it works and displays Paypal site in english, but even better: there is a small language selector at top right for english, spanish, french and chinese. What worries me is that the address for the site is way shorter for the english version than the spanish, I can't test for the payment as I can't pay myself but hope it will work. Most probably I can add a simple condition to test if language is spanish and in this case force LOCALECODE to 'es_ES' Please let me know your thoughts, thanks 1 Link to comment Share on other sites More sharing options...
al_foto Posted April 10, 2013 Author Share Posted April 10, 2013 Ok, final version that seems to work fine is: $thisLC = 'en_US'; if (class_exists('Context')) $this->context = Context::getContext(); if( $this->context->language->iso_code == 'es' ) { $thisLC = 'es_ES'; } // Making request string $method_version = (!empty($method_version)) ? $method_version : PAYPAL_API_VERSION; $params = array( 'METHOD' => $methodName, 'VERSION' => $method_version, 'PWD' => Configuration::get('PAYPAL_API_PASSWORD'), 'USER' => Configuration::get('PAYPAL_API_USER'), 'SIGNATURE' => Configuration::get('PAYPAL_API_SIGNATURE'), 'LOCALECODE' => $thisLC ); This way I have the Paypal site in the correct language depending on the language set in my shop, I only have 2 languages but should not be difficult to extend for some more. May be Paypal has his own criteria for setting the language but at least I'm controlling that in the worst scenario the customer gets an english Paypal site. Have to test purchasing myself but should work ... I hope Link to comment Share on other sites More sharing options...
emily_d Posted May 4, 2013 Share Posted May 4, 2013 Hi, thanks for the digging Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now