Fix currency with facebook pixel

This commit is contained in:
Michael RICOIS 2018-01-22 10:24:57 +01:00
parent 3382d89a7e
commit 64d33eafb7
3 changed files with 7 additions and 15 deletions

View File

@ -16,19 +16,11 @@ class OrderConfirmationController extends OrderConfirmationControllerCore
$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(
self::$smarty->assign(array(
'order' => $order,
'productIds' => $productIds,
'currency' => $currencyIsoCode,
)
);
'currency' => Currency::getCurrency((int) $order->id_currency),
));
}
public function displayContent()

View File

@ -413,7 +413,7 @@
<script>
fbq('track', 'Purchase', {
value: '{/literal}{$order->total_paid}{literal}',
currency: "{/literal}{$currencyIsoCode}{literal}"
currency: "{/literal}{$currency['iso_code']}{literal}"
});
</script>
{/literal}

View File

@ -395,7 +395,7 @@
<script>
fbq('track', 'Purchase', {
value: '{/literal}{$order->total_paid}{literal}',
currency: "{/literal}{$currencyIsoCode}{literal}"
currency: "{/literal}{$currency['iso_code']}{literal}"
});
</script>
{/literal}