lead capture optInDateTime placeholder
This commit is contained in:
@@ -47,6 +47,7 @@ class LeadCapture extends Record
|
||||
$this->addDependency('container');
|
||||
$this->addDependency('defaultLanguage');
|
||||
$this->addDependency('hookManager');
|
||||
$this->addDependency('dateTime');
|
||||
}
|
||||
|
||||
protected function getMailSender()
|
||||
@@ -531,6 +532,17 @@ class LeadCapture extends Record
|
||||
$body = str_replace('{optInUrl}', $url, $body);
|
||||
$body = str_replace('{optInLink}', $linkHtml, $body);
|
||||
|
||||
$createdAt = $uniqueId->get('createdAt');
|
||||
if ($createdAt) {
|
||||
$dateString = $this->getInjection('dateTime')->convertSystemDateTime($createdAt, null, $this->getConfig()->get('dateFormat'));
|
||||
$timeString = $this->getInjection('dateTime')->convertSystemDateTime($createdAt, null, $this->getConfig()->get('timeFormat'));
|
||||
$dateTimeString = $this->getInjection('dateTime')->convertSystemDateTime($createdAt);
|
||||
|
||||
$body = str_replace('{optInDate}', $dateString, $body);
|
||||
$body = str_replace('{optInTime}', $timeString, $body);
|
||||
$body = str_replace('{optInDateTime}', $dateTimeString, $body);
|
||||
}
|
||||
|
||||
$email = $this->getEntityManager()->getEntity('Email');
|
||||
$email->set([
|
||||
'to' => $emailAddress,
|
||||
|
||||
Reference in New Issue
Block a user