diff --git a/src/Checkout/OrderEmailNotifier.php b/src/Checkout/OrderEmailNotifier.php index 69deb6d90..ca95990ee 100644 --- a/src/Checkout/OrderEmailNotifier.php +++ b/src/Checkout/OrderEmailNotifier.php @@ -232,7 +232,12 @@ public function sendCancelNotification() )) ->setFrom(Email::config()->admin_email) ->setTo(Email::config()->admin_email) - ->setBody($this->order->renderWith(Order::class)); + ->setHTMLTemplate('SilverShop/Model/Order_CancelEmail') + ->setData( + [ + 'Order' => $this->order, + ] + ); $this->extend('updateCancelNotificationEmail', $email); diff --git a/templates/SilverShop/Model/Order_CancelEmail.ss b/templates/SilverShop/Model/Order_CancelEmail.ss new file mode 100644 index 000000000..db9c5190f --- /dev/null +++ b/templates/SilverShop/Model/Order_CancelEmail.ss @@ -0,0 +1,42 @@ + + + + + <%t SilverShop\ShopEmail.CancelNotificationTitle "Order cancelled" %> + <% include SilverShop\Includes\OrderReceiptStyle %> + + + + + + +
+ + + + + + + + <% if $Order %> + + + + + <% loop $Order %> + + + + <% end_loop %> + <% end_if %> + +
+

$Subject

+
+ <%t SilverShop\ShopEmail.OrderCancelled 'Order #{OrderNo} was cancelled"' OrderNo=$Order.Reference %> +
+ <% include SilverShop\Model\Order %> +
+
+ +