add thirdparty customer code to substitutionarray
This commit is contained in:
parent
20fbfc5b15
commit
ff178667a3
@ -201,6 +201,13 @@ if (empty($reshook))
|
||||
|
||||
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
|
||||
$substitutionarray['__ID__'] = $obj->source_id;
|
||||
if ($obj->source_type == "thirdparty") {
|
||||
$thirdpartystatic = new Societe($db);
|
||||
$thirdpartystatic->fetch($obj->source_id);
|
||||
|
||||
$substitutionarray['__THIRDPARTY_CUSTOMER_CODE__'] = $thirdpartystatic->code_client;
|
||||
$substitutionarray['__THIRDPARTY_CUSTOMER_CODE_WITHOUT_PREFIX__'] = substr($thirdpartystatic->code_client, 1);
|
||||
}
|
||||
$substitutionarray['__EMAIL__'] = $obj->email;
|
||||
$substitutionarray['__LASTNAME__'] = $obj->lastname;
|
||||
$substitutionarray['__FIRSTNAME__'] = $obj->firstname;
|
||||
|
||||
@ -1502,6 +1502,8 @@ class FormMail extends Form
|
||||
|
||||
// For mass emailing, we have different keys
|
||||
$tmparray['__ID__'] = 'IdRecord';
|
||||
$tmparray['__THIRDPARTY_CUSTOMER_CODE__'] = 'CustomerCode';
|
||||
$tmparray['__THIRDPARTY_CUSTOMER_CODE_WITHOUT_PREFIX__'] = 'CustomerCodeWithoutPrefix';
|
||||
$tmparray['__EMAIL__'] = 'EMailRecipient';
|
||||
$tmparray['__LASTNAME__'] = 'Lastname';
|
||||
$tmparray['__FIRSTNAME__'] = 'Firstname';
|
||||
|
||||
@ -116,6 +116,8 @@ ToAddRecipientsChooseHere=Pour ajouter des destinataires, choisir dans les liste
|
||||
NbOfEMailingsReceived=Emailings de masse reçus
|
||||
NbOfEMailingsSend=Emailings de masse envoyés
|
||||
IdRecord=ID enregistrement
|
||||
CustomerCode = Code client
|
||||
CustomerCodeWithoutPrefix = Code client sans préfix
|
||||
DeliveryReceipt=Accusé de réception
|
||||
YouCanUseCommaSeparatorForSeveralRecipients=Vous pouvez utiliser le caractère de séparation <b>virgule</b> pour spécifier plusieurs destinataires.
|
||||
TagCheckMail=Suivre l'ouverture de l'email
|
||||
|
||||
Loading…
Reference in New Issue
Block a user