Jump to content

Send to a friend email


Ckay

Recommended Posts

Hi and thanks in advance.

 

I want to edit the standard email that a person receives if someone else has chosen the "send to a friend" option on any particular product.

 

At the moment the recipient receives a message in block capitals -

 

A FRIEND HAS SENT YOU A LINK TO A PRODUCT THAT (S)HE THINKS MAY INTEREST YOU.

 

Unsightly to say the least.

 

I’ve found a fairly long list of editable email responses but unfortunately “send to a friend” is not one of them. Instead there is a virtually empty drop down – see attached image.

 

Could anyone tell me how I can edit the contents of this email?

post-989338-0-81106600-1468853247_thumb.jpg

Link to comment
Share on other sites

It looks like you'll have to manually edit the mail templates. Check whether themes/<your_theme>/modules/sendtoafriend/mails/<lang_iso>/send_to_a_friend.html and send_to_a_friend.txt exist. If not, copy modules/sendtoafriend/mails/<lang_iso>/send_to_a_friend.html and send_to_a_friend.txt to that location. You can then edit send_to_a_friend.html in your theme and remove the text-transform: uppercase; from line 83. Be careful to copy and edit all the languages you'll need.

  • Like 1
Link to comment
Share on other sites

It looks like you'll have to manually edit the mail templates. Check whether themes/<your_theme>/modules/sendtoafriend/mails/<lang_iso>/send_to_a_friend.html and send_to_a_friend.txt exist. If not, copy modules/sendtoafriend/mails/<lang_iso>/send_to_a_friend.html and send_to_a_friend.txt to that location. You can then edit send_to_a_friend.html in your theme and remove the text-transform: uppercase; from line 83. Be careful to copy and edit all the languages you'll need.

 

Thanks for your reply Rocky.

 

I've located the in modules/sendtoafriend/mails/<lang_iso> folder as you've described. Can I not just edit the file(s) in situ  rather than copy/moving them to the corresponding theme folder?

 

*Edit*

The other thing is why is there a html file and a text file? Do both require editing?

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

You can edit the root mail templates, but it is better to copy them to the theme's directory so they aren't overwritten when upgrading PrestaShop. If you're using a modified version of the default PrestaShop theme, you should copy and rename it so it isn't overwritten when PrestaShop is upgraded.

 

Yes, you need to edit both the HTML and TXT files. One is used by email readers that support HTML and the other by email readers that don't support HTML.

  • Like 1
Link to comment
Share on other sites

You can edit the root mail templates, but it is better to copy them to the theme's directory so they aren't overwritten when upgrading PrestaShop. If you're using a modified version of the default PrestaShop theme, you should copy and rename it so it isn't overwritten when PrestaShop is upgraded.

 

Yes, you need to edit both the HTML and TXT files. One is used by email readers that support HTML and the other by email readers that don't support HTML.

 

Excellent.

 

Thanks for your informative replies.

Link to comment
Share on other sites

  • 1 month later...
The "Send to a friend" module sends the email from the customer's email, not from the shop's email, so there's no need to do anything. It's being sent from your work email because your test account is using your work email.
 
If you want the email sent from your shop email instead of the customer's email, you'll need to change lines 85-86 of modules/sendtoafriend/sendtoafriend_ajax.php:
				($module->context->cookie->email ? $module->context->cookie->email : null),
				($module->context->cookie->customer_firstname ? $module->context->cookie->customer_firstname.' '.$module->context->cookie->customer_lastname : null),

to:

				Configuration::get('PS_SHOP_EMAIL'),
				Configuration::get('PS_SHOP_NAME'),
Link to comment
Share on other sites

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