Updated: The mail subject confiuration

This commit is contained in:
vishalsingh.qlo325
2025-02-10 14:55:13 +05:30
parent 64097b47c6
commit d5b2f1477d
3 changed files with 12 additions and 10 deletions

View File

@@ -296,8 +296,8 @@ class MailCore extends ObjectModel
}
/* Create mail and attach differents parts */
if (Configuration::get('SHOP_AS_SUBJECT_PREFIX')) {
$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;
if (Configuration::get('PS_MAIL_SUBJECT_PREFIX')) {
$subject = '[' . strip_tags($configuration['PS_SHOP_NAME']) . '] ' . $subject;
}
$message->setSubject($subject);

View File

@@ -109,6 +109,12 @@ class AdminEmailsControllerCore extends AdminController
2 => $this->l('Set my own SMTP parameters (for advanced users ONLY)')
)
),
'PS_MAIL_SUBJECT_PREFIX' => array(
'title' => $this->l('Enable the store name as a prefix in the email\'s subject'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool',
),
'PS_MAIL_TYPE' => array(
'title' => '',
'validation' => 'isGenericName',
@@ -125,14 +131,7 @@ class AdminEmailsControllerCore extends AdminController
'validation' => 'isBool',
'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'))
),

View File

@@ -785,6 +785,9 @@
<configuration id="PS_MAIL_METHOD" name="PS_MAIL_METHOD">
<value>1</value>
</configuration>
<configuration id="PS_MAIL_SUBJECT_PREFIX" name="PS_MAIL_SUBJECT_PREFIX">
<value>1</value>
</configuration>
<configuration id="PS_SHOP_ACTIVITY" name="PS_SHOP_ACTIVITY">
<value>Animaux</value>
</configuration>