Jump to content

(Solved) {shop_url} in email template redirects to index.php


Recommended Posts

In the BO translations, emails sent to customers have a link at the bottom

 

You can now place orders on our shop: {shop_url}

 

When clicked - customer sees this:

 

[Debug] This page has moved

Please use the following URL instead: http://www.whispardesign.com/

 

Yes it functions properly but not very user friendly.

What do I need to change in {shop_url} to leave off index.php?

Edited by Whispar1 (see edit history)
Link to comment
Share on other sites

As a crude workaround I modified account.html {shop_url} with actual URL

<td align="left">You can now place orders on our shop: <a href="{shop_url}">{shop_name}</a>.</td>

 

It would be nice to know why the email templates are trying to go to index.php so if anyone has an Idea how to format shop_url to not go to index.php, it is appreciated. Otherwise the manual change for all the html email temps will be a pain but doable if that is the only workable option.

Link to comment
Share on other sites

1.5.3.1

What is interesting is the links inside the email body (my account, order history, etc.) are all url friendly links that go directly to the page. Only the shop url goes to index.php

 

Also the intransit email does not have a follow up link:

You can track your package using the following link: {followup}

Edited by Whispar1 (see edit history)
Link to comment
Share on other sites

I'm surprised more people do not have this issue (or never bothered to check what is being sent to customers). It may seem trivial, but it's just not very customer-centric for a customer to get an error message that the main page to your site doesn't exist and must click a redirect link to get to it.

Link to comment
Share on other sites

classes/Mail.php

Line 250

//~ $template_vars['{shop_url}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__.'index.php';

$template_vars['{shop_url}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__;

and... here we go =)

  • Like 3
Link to comment
Share on other sites

Recheck your code and make sure it looks exactly like this

 

//~ $template_vars['{shop_url}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__.'index.php';
$template_vars['{shop_url}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__;

 

particularly make sure the period after _PS_BASE_URI_ was not accidentally left in place.

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
×
×
  • Create New...