Jump to content

Remove annoying [Shop Name] prefix on email subject, version 1.7

Mercader Virtual

Recommended Posts


I know this question has been asked several times. I tried different solutions but something weird is going on:

I edited Mail.php and managed to strip out the shop name $subject.

// Hard-coded replacement, just in case.
$subject = str_replace("[".Configuration::get('PS_SHOP_NAME')."] ", "", $subject);

I checked the $message object just before swift execution:

$send = $swift->send($message);

The subject appears to be correct (without the shop name),  as expected. But guess what?

Still some emails are arriving with that freaking "[Shop Name]" prefix! Funny enough, not all, that is, some are arriving without the shop name.

I thought it was something related to smarty cache, so I clear the cache. It didn't work :(

Any other ideas? Thanks.


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

  • 6 months later...
  • 1 year later...

You should replace in line ~460 (file /classes/Mail.php, function send()):

/* Create mail and attach differents parts */
$subject = '[' . Configuration::get('PS_SHOP_NAME', null, null, $idShop) . '] ' . $subject;


/* Create mail and attach differents parts */

Then it should work.

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