diff --git a/classes/Mail.php b/classes/Mail.php index 2e321aa6a..0f96954b7 100644 --- a/classes/Mail.php +++ b/classes/Mail.php @@ -296,7 +296,10 @@ class MailCore extends ObjectModel } /* Create mail and attach differents parts */ - $subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject; + if (Configuration::get('SHOP_AS_SUBJECT_PREFIX')) { + $subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject; + } + $message->setSubject($subject); $message->setCharset('utf-8'); diff --git a/controllers/admin/AdminEmailsController.php b/controllers/admin/AdminEmailsController.php index b933780ad..58b60b3ec 100644 --- a/controllers/admin/AdminEmailsController.php +++ b/controllers/admin/AdminEmailsController.php @@ -126,6 +126,13 @@ class AdminEmailsControllerCore extends AdminController 'cast' => 'intval', 'type' => 'bool' ), + 'SHOP_AS_SUBJECT_PREFIX' => array( + 'title' => $this->l('Add Website name to email subject'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'desc' => $this->l('Enable to prefix email subjects with the Website name') + ), ), 'submit' => array('title' => $this->l('Save')) ),