Get currency ISO
This commit is contained in:
parent
850a678976
commit
3382d89a7e
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
class OrderConfirmationController extends OrderConfirmationControllerCore {
|
||||
|
||||
public function preProcess() {
|
||||
// Fix : delay after payment from paybox or paypal
|
||||
class OrderConfirmationController extends OrderConfirmationControllerCore
|
||||
{
|
||||
public function preProcess()
|
||||
{
|
||||
// Fix : delay after payment from paybox or paypal
|
||||
// so that the order has enough time to be created.
|
||||
sleep(5);
|
||||
|
||||
@ -15,16 +16,23 @@ 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(
|
||||
'order' => $order,
|
||||
'productIds' => $productIds,
|
||||
'currency' => Currency::getCurrency((int) $order->id_currency),
|
||||
'currency' => $currencyIsoCode,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function displayContent() {
|
||||
public function displayContent()
|
||||
{
|
||||
$customer = Context::getContext()->customer;
|
||||
|
||||
$order = new Order($this->id_order);
|
||||
|
@ -413,7 +413,7 @@
|
||||
<script>
|
||||
fbq('track', 'Purchase', {
|
||||
value: '{/literal}{$order->total_paid}{literal}',
|
||||
currency: "{/literal}{$currency['name']}{literal}"
|
||||
currency: "{/literal}{$currencyIsoCode}{literal}"
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
@ -395,7 +395,7 @@
|
||||
<script>
|
||||
fbq('track', 'Purchase', {
|
||||
value: '{/literal}{$order->total_paid}{literal}',
|
||||
currency: "{/literal}{$currency['name']}{literal}"
|
||||
currency: "{/literal}{$currencyIsoCode}{literal}"
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
Loading…
Reference in New Issue
Block a user