Presta Shop

If you are using Presta shop as an e-commerce platform, then you will need to edit two files: controllers/front/OrderConfirmationController.php and themes/theme/order-confirmation.tpl

Replace the following placeholders with the program values:
CAMPAIGN_UNIQUE: you received it by e-mail
CONFIRM: you received it by e-mail

If you want to deduct VAT in the tracking code, you can add amount={$total_products/1.19} where 1.19 means that VAT is 19%. Bear in mind that VAT isn’t a stable percentage so this value can change.

In OrderConfirmationController.php, inside initContent() function, just before setting the template as ‘order-confirmation.tpl’, add:

$order = new Order($this->id_order); $cart = new Cart($order->id_cart); $description=""; foreach ($cart->getProducts() AS $k=>$v) { $description.=$v['name']."X".$v['quantity']; } $description=urlencode($description); $this->context->smarty->assign(array( 'total_to_pay'=>$order->getOrdersTotalPaid(), 'total_products'=>$order->total_products_wt, 'description'=>$description ));

In themes/theme/order-confirmation.tpl you will need to add the following code, modified with your own variables and values (if you want to substract the VAT from the order total):

<iframe height='1' width='1' scrolling='no' marginheight='0' marginwidth='0' frameborder='0' src='{$total_products}&campaign_unique=CAMPAIGN_UNIQUE&confirm=CONFIRM&description={$description}&transaction_id={Tools::getvalue('id_order')}&'></iframe>

The store currency must be configured in 2Performant platform, by going to Settings/General, Commission section, and setting the Currency.

Was this article helpful to you? Yes 1 No 2