Jump to content

Wrong language links in email templates


Recommended Posts

Hi to you all,

 

I'm having a problem with my email links. Every link in the emails redirect to wrong language. My site is in Greek and English. The language of the emails is correct (Greek) but the links that get the customer back to my shop redirect to the English site. 

 

Any way to fix that?

 

I tried changing Mail.php from this:

$template_vars['{shop_url}'] = Context::getContext()->link->getPageLink('index', true, Context::getContext()->language->id, null, false, $id_shop);
			$template_vars['{my_account_url}'] = Context::getContext()->link->getPageLink('my-account', true, Context::getContext()->language->id, null, false, $id_shop);
			$template_vars['{guest_tracking_url}'] = Context::getContext()->link->getPageLink('guest-tracking', true, Context::getContext()->language->id, null, false, $id_shop);
			$template_vars['{history_url}'] = Context::getContext()->link->getPageLink('history', true, Context::getContext()->language->id, null, false, $id_shop);

to this:

$template_vars['{shop_url}'] = Context::getContext()->link->getPageLink('index', true, Context::getContext()->languages->el, null, false, $id_shop);
			$template_vars['{my_account_url}'] = Context::getContext()->link->getPageLink('my-account', true, Context::getContext()->languages->el, null, false, $id_shop);
			$template_vars['{guest_tracking_url}'] = Context::getContext()->link->getPageLink('guest-tracking', true, Context::getContext()->languages->el, null, false, $id_shop);
			$template_vars['{history_url}'] = Context::getContext()->link->getPageLink('history', true, Context::getContext()->languages->el, null, false, $id_shop);

but didn't work. Any idea?

Link to comment
Share on other sites

  • 4 months later...

Hi Vekia,

 

well, mines is 1.6.0.14 - and yes, emails are from starshop (leothemes) - the thing is, urls currently look like this (in HTML):

 

 href="{history_url}"

href="{guest_tracking_url}?id_order={order_name}"

 

seems that the definition is correct - there's something that makes them see wrong language - prestashop always gives links as in english, and fails to see that there are other languages installed or something...

Link to comment
Share on other sites

  • 7 months later...

hello, I have the same issue on 1.6.1.4

 

eg. mail for "Preparation in progress" now it comes with the footer links as default language, while the email content language is correct...

 

where is the bug?

thanks

Link to comment
Share on other sites

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