From 64fd18c286e48abf5fed97f84667082c433e04cd Mon Sep 17 00:00:00 2001 From: TheCoreDev Date: Wed, 30 Sep 2020 11:51:54 +0200 Subject: [PATCH] =?UTF-8?q?Rajout=20du=20nb=20de=20points=20fid=C3=A9lit?= =?UTF-8?q?=C3=A9=20dans=20le=20mail=20envoy=C3=A9=20au=20statut=20"Livr?= =?UTF-8?q?=C3=A9"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/override/classes/order/OrderHistory.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/override/classes/order/OrderHistory.php b/web/override/classes/order/OrderHistory.php index 2838a88ea..55516396a 100644 --- a/web/override/classes/order/OrderHistory.php +++ b/web/override/classes/order/OrderHistory.php @@ -50,6 +50,10 @@ class OrderHistory extends OrderHistoryCore $data['{total_paid}'] = Tools::displayPrice((float) $order->total_paid, new Currency((int) $order->id_currency), false); + $customerId = new Customer((int) $delivery->id_customer); + $data['{totalPoints}'] = (int)LoyaltyModuleAdvanced::getPointsByCustomer($customerId->id); + $data['{totalEuros}'] = (int)LoyaltyModuleAdvanced::getVoucherValue($data['{totalPoints}']); + if (Validate::isLoadedObject($order)) { // Attach invoice and / or delivery-slip if they exists and status is set to attach them if (($result['pdf_invoice'] || $result['pdf_delivery'])) {