fxdesca Posted February 10, 2015 Share Posted February 10, 2015 (edited) Hi, I need to configure a tracking code for the affiliate network ZANOX. Im' using Prestashop 1.6.0.9. I found a topic https://www.prestashop.com/forums/topic/250595-solved-affiliate-tracking-code/ dealing with this issue but it doesn't fill all variables i need. Here is the code i need to use : <script type="text/javascript"> var zx_transaction = "XXX"; var zx_total_amount = "XXX"; var zx_total_currency = "EUR"; var zx_products = [ { "identifier": "XXX", "amount": "XXX", "currency": "EUR", "quantity": "XXX" }, { // next product… } ]; </script> So i need : - Transaction is the id order - Total amount is the total order price without tax and without delivery - Currency is okay - Identifier of article - Currency is okay - Quantity is the number of the same product selected. I used this code found in the topic : In 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 )); So i have total amount, using $total_products in order-confirmation.tpl, but I'm missing the other values. Thanks for help François Edited February 10, 2015 by fxdesca (see edit history) 1 Link to comment Share on other sites More sharing options...
afshop Posted March 3, 2016 Share Posted March 3, 2016 Hi, I need to configure a tracking code for the affiliate network ZANOX. Im' using Prestashop 1.6.0.9. I found a topic https://www.prestashop.com/forums/topic/250595-solved-affiliate-tracking-code/ dealing with this issue but it doesn't fill all variables i need. Here is the code i need to use : <script type="text/javascript"> var zx_transaction = "XXX"; var zx_total_amount = "XXX"; var zx_total_currency = "EUR"; var zx_products = [ { "identifier": "XXX", "amount": "XXX", "currency": "EUR", "quantity": "XXX" }, { // next product… } ]; </script> So i need : - Transaction is the id order - Total amount is the total order price without tax and without delivery - Currency is okay - Identifier of article - Currency is okay - Quantity is the number of the same product selected. I used this code found in the topic : In 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 )); So i have total amount, using $total_products in order-confirmation.tpl, but I'm missing the other values. Thanks for help François Hello François I have to configure zanox tracking me too, how did you it? Can you help me? Thanks Angela Link to comment Share on other sites More sharing options...
Recommended Posts