Added: Configuration for Admin to inclued website name in the email subject

This commit is contained in:
vishalsingh.qlo325
2025-02-05 18:14:32 +05:30
parent 950b37ed1c
commit 64097b47c6
2 changed files with 11 additions and 1 deletions

View File

@@ -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');

View File

@@ -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'))
),