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