From 64d33eafb71e8359855f910b62da477041c21bb7 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 22 Jan 2018 10:24:57 +0100 Subject: [PATCH] Fix currency with facebook pixel --- .../OrderConfirmationController.php | 18 +++++------------- themes/site/header.tpl | 2 +- themes/site_mobile/header.tpl | 2 +- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/override/controllers/OrderConfirmationController.php b/override/controllers/OrderConfirmationController.php index 7cd454bb..7ad5dd2b 100755 --- a/override/controllers/OrderConfirmationController.php +++ b/override/controllers/OrderConfirmationController.php @@ -15,20 +15,12 @@ class OrderConfirmationController extends OrderConfirmationControllerCore foreach ($products as $product) { $productIds[] = (int) $product['product_id']; } - - $currency = Currency::getCurrency((int) $order->id_currency); - $currencyIsoCode = 'EUR'; - if (!empty($currency['iso_code'])) { - $currencyIsoCode = $currency['iso_code']; - } - self::$smarty->assign( - array( - 'order' => $order, - 'productIds' => $productIds, - 'currency' => $currencyIsoCode, - ) - ); + self::$smarty->assign(array( + 'order' => $order, + 'productIds' => $productIds, + 'currency' => Currency::getCurrency((int) $order->id_currency), + )); } public function displayContent() diff --git a/themes/site/header.tpl b/themes/site/header.tpl index 9c7aa596..a80405b5 100755 --- a/themes/site/header.tpl +++ b/themes/site/header.tpl @@ -413,7 +413,7 @@ {/literal} diff --git a/themes/site_mobile/header.tpl b/themes/site_mobile/header.tpl index 96254a38..e6bab81d 100755 --- a/themes/site_mobile/header.tpl +++ b/themes/site_mobile/header.tpl @@ -395,7 +395,7 @@ {/literal}