Rajout du nb de points fidélité dans le mail envoyé au statut "Livré"

This commit is contained in:
2020-09-30 11:51:54 +02:00
parent 5403b65f07
commit 64fd18c286

View File

@@ -50,6 +50,10 @@ class OrderHistory extends OrderHistoryCore
$data['{total_paid}'] = Tools::displayPrice((float) $order->total_paid, new Currency((int) $order->id_currency), false); $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)) { if (Validate::isLoadedObject($order)) {
// Attach invoice and / or delivery-slip if they exists and status is set to attach them // Attach invoice and / or delivery-slip if they exists and status is set to attach them
if (($result['pdf_invoice'] || $result['pdf_delivery'])) { if (($result['pdf_invoice'] || $result['pdf_delivery'])) {