Skip to content

Commit

Permalink
Email Template
Browse files Browse the repository at this point in the history
  • Loading branch information
elisei committed Apr 29, 2022
1 parent 7312da8 commit 88fdebb
Show file tree
Hide file tree
Showing 12 changed files with 188 additions and 116 deletions.
7 changes: 4 additions & 3 deletions Model/Customer/Notifier/MailSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ final class MailSender extends AbstractMailSender implements SenderInterface
/**
* @var LoggerInterface
*/
private $logger;
private LoggerInterface $logger;

/**
* @var View
*/
private $customerViewHelper;
private View $customerViewHelper;

/**
* @var StoreManagerInterface
Expand All @@ -50,7 +50,8 @@ public function __construct(
}

/**
* @inheritdoc
* @param CustomerInterface $customer
* @return void
* @throws LocalizedException
* @throws MailException
* @throws NoSuchEntityException
Expand Down
5 changes: 4 additions & 1 deletion Model/Order/Notifier/MailSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ final class MailSender extends AbstractMailSender implements SenderInterface
/**
* @var LoggerInterface
*/
private $logger;
private LoggerInterface $logger;

/**
* @var StoreManagerInterface
*/
private StoreManagerInterface $storeManager;

public function __construct(
Expand Down
27 changes: 17 additions & 10 deletions view/frontend/email/erase_canceled.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}
28 changes: 17 additions & 11 deletions view/frontend/email/erase_canceled_guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

{{template config_path="design/email/footer_template"}}
<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
29 changes: 18 additions & 11 deletions view/frontend/email/erase_pending.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have received a request to erase the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
{{trans 'You can cancel the erase whitin %delay hours by <a href="%account_url">logging into your account</a>.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}
</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans 'You can cancel the erase whitin %delay hours by <a href="%account_url">logging into your account</a>.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}
29 changes: 18 additions & 11 deletions view/frontend/email/erase_pending_guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have received a request to erase the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
{{trans 'You can cancel the erase whitin %delay hours by <a href="%account_url">logging into your account</a>.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}
</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans 'You can cancel the erase whitin %delay hours by <a href="%account_url">logging into your account</a>.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}
28 changes: 18 additions & 10 deletions view/frontend/email/erase_succeeded.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have successfully erased the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans 'You can cancel the erase whitin %delay hours by <a href="%account_url">logging into your account</a>.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}
28 changes: 18 additions & 10 deletions view/frontend/email/erase_succeeded_guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have successfully erased the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans 'You can cancel the erase whitin %delay hours by <a href="%account_url">logging into your account</a>.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}
32 changes: 19 additions & 13 deletions view/frontend/email/export_pending.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have received a request to export the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>

<p>{{trans "We will notify you when the export will be ready. The action will be available in your account."}}</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

{{template config_path="design/email/footer_template"}}
<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans "We will notify you when the export will be ready. The action will be available in your account."}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}
30 changes: 18 additions & 12 deletions view/frontend/email/export_pending_guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have received a request to export the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>

<p>{{trans "We will notify you when the export will be ready. The action will be available in your account."}}</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans "We will notify you when the export will be ready. The action will be available in your account."}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}
31 changes: 19 additions & 12 deletions view/frontend/email/export_ready.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,23 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have received a request to export the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>

<p>{{trans "The export of you personal data is ready. The action is now available in your account."}}</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans "The export of you personal data is ready. The action is now available in your account."}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}

30 changes: 18 additions & 12 deletions view/frontend/email/export_ready_guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
} @-->

{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>

<p>
{{trans "We have received a request to export the information associated with your account at %store_name." store_name=$store.getFrontendName()}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>

<p>{{trans "The export of you personal data is ready. The action is now available in your account."}}</p>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.getFrontendName() |raw}}</p>

<table border="0" cellspacing="0" width="100%" cellpadding="0">
<tr class="email-intro">
<td>
<p class="greeting">{{trans "%name," name=$customer_data.customer_name}}</p>
</td>
</tr>
<tr class="email-summary">
<td>
<p>{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}}</p>
<p>{{trans "The export of you personal data is ready. The action is now available in your account."}}</p>
</td>
</tr>
<tr class="help-info">
<td>
<p>{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.</p>
</td>
</tr>
</table>
{{template config_path="design/email/footer_template"}}

0 comments on commit 88fdebb

Please sign in to comment.