Jump to content

2performant tracking code problem


Webist

Recommended Posts

Hi, recently moved my store to prestashop 1.7.7.5, and I try to install tracking code for 2performant affiliate platform.I installed the code in 2 different files,1.) controllers/front/OrderConfirmationController.php and 2.)themes/theme/templates/checkout/order-confirmation.tpl, but if I place an order with discount code, the commission was calculated based on real price without discount code.

 https://prnt.sc/26dc5iv

This is the code for: controllers/front/OrderConfirmationController.php 

$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 ));

and this is the code for: themes/theme/templates/checkout/order-confirmation.tpl

<iframe height='1' width='1' scrolling='no' marginheight='0' marginwidth='0' frameborder='0' src='https://event.2performant.com/events/salecheck?amount={$total_products}&campaign_unique=CAMPAIGN_UNIQUE&confirm=CONFIRM&description={$description}&transaction_id={Tools::getvalue('id_order')}&'></iframe>

Someone can help me to solve this issue?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...