Jump to content
qubo2017

How to remove shop name in email subject

Recommended Posts

Hi all

 

MY prestashop version 1.6.1.1

 

How can i remove the {shop_name} from the subject, it shows the shop names twice both in the email title and subjuct. I want to make it cool and clean like this:

 

 

{shop_name}

order confirmation 

you order has succesfully ............

 

and not like this:

 

 

{shop_name}

{shop_name}order confirmation 

you order has succesfully ............

 
I did my homework by searching the forum for hours, and found these 2 solution, but no good for me. 
 
I tried this method below in classes/Mail.php, not working 
 
$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;

 

change to 

 

$subject = $subject;    

 

 

I tried this method below in override/classes/Mail.php , not working 

 
$message = new Swift_Message($subject);
 
 
I have a email tempate module installed, I am curently using it. I am not sure if this is the reason why it is not working. 
 
Could anyone give me some advise?
Edited by qubo2017 (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

classes/Mail.php

Change:
$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;

To:
//$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;

 

It works for me

  • Thanks 2

Share this post


Link to post
Share on other sites

Hi,

 

classes/Mail.php

 

Change:

$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;

 

To:

//$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;

 

It works for me

Thank you so much Hanz

 

It actually works!   Now my emails subjects are nice and clean !

Share this post


Link to post
Share on other sites

Yes, for me worked on PS1.7.4.2.

I simply commented out line 461:

$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $idShop).'] '.$subject;

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
On 3/21/2017 at 10:06 AM, HanzCZ said:

Hi,

 

classes/Mail.php

Change:
$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;

To:
//$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;

 

It works for me

PRESTASHOP 1.7.6.0

Hi I have a problem with Shop Name in emails, appears "My shop" and don´t take the real Shop name

I modified the Mail.php as HanzCZ explained in the post before and works for email Subject, but still appears in the rest of the email where "Shop Name" is used.

Please any ideas to solve all the fields in emails where "Shop Name" is used.

Thanks

JF

Edited by Juan Luis Ferret (see edit history)

Share this post


Link to post
Share on other sites
On 7/14/2019 at 6:46 AM, Juan Luis Ferret said:

PRESTASHOP 1.7.6.0

Hi I have a problem with Shop Name in emails, appears "My shop" and don´t take the real Shop name

I modified the Mail.php as HanzCZ explained in the post before and works for email Subject, but still appears in the rest of the email where "Shop Name" is used.

Please any ideas to solve all the fields in emails where "Shop Name" is used.

Thanks

JF

For me the same problem with Shop name in emails do not want to change in all templates. Any ideas?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More