Post by dfumagalli » Fri Jul 25, 2014 7:14 am


I'd like to ask to who knows well OpenCart 1.5.6 if they have experienced this "structural" issue and if so, if they fixed it or if some recent version fixed it.

Basically, we have customers from all over the world, paying with credit card, Paypal and bank transfer.

Now, I have noticed (please correct me if I am wrong) that if they use Bank Transfer at checkout, the notification emails get appropriately sent in the same language the customer used to create the order.

On the contrary, Paypal and other payment methods that rely on a callback to be called by the Paypal / whatever backend itself, see the notification emails being always delivered in English.

Now, some countries have funny laws that require the order email to be printed and (upon inspection) being read by the local police, who usually don't know a syllabe in English :( .

Does this happen because our OpenCart 1.5.6 installation is broken? Or is it due to the fact that:

- Bank Transfer calls Checkout's "Confirm()" function from within the customer OpenCart and so it "knows" the various session variables including the selected language.

- Paypal and others instead, directly call the callback from a "zero set variables and zero session variables" environment (their backend) and therefore the end user language preference gets lost?

Heavy OpenCart Customizations. Current project in progress:

Active Member


Tue Aug 20, 2013 3:34 am

Post by JAY6390 » Fri Jul 25, 2014 7:22 am

Sounds like your install is broken. Check the code that runs the email, which can be found in this file ... r.php#L249
Notice how it loads the language based on the stored data in the database, not the current language configuration? This means that in theory it shouldn't be affected by payment type (though I've not actually tried this)


User avatar
Guru Member


Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by dfumagalli » Fri Jul 25, 2014 8:52 am

Thank you!
Now that I recall, I have installed the Override Engine and it alters exactly that line with this code:

Code: Select all

// Send out order confirmation mail
                        $language = $this->factory->newLanguage($order_info['language_directory']);
I am going to investigate further, and eventually notify its author about the problem.

Heavy OpenCart Customizations. Current project in progress:

Active Member


Tue Aug 20, 2013 3:34 am
Who is online

Users browsing this forum: No registered users and 37 guests