Oscar Posted May 30, 2018 Share Posted May 30, 2018 Hola Estoy intentando implementar el código de seguimiento de Kelkoo. En el archivo order-confirmation.tpl se me pide que introduzca código pero hay dos variables que son dinámicas. "$sales y $orderid . El prestashop dónde estoy intentando introducir el traking es el 1.6.XX Estas dos varibles dependen del prestashop, por tanto en kelkoo no saben decirme cual es el nombre de cada una de las 2 etquetas. Alguien me puede ayudar, pues necesito saber cual serían estas dos etqiuetas que deben sustituir a $sales y $orderir Muchas Gracias. orderValue: '{$sales}', orderId: '{$orderid}', Este es parte del código de OrderConfirmationControler.php public function initContent() { /* Kelkoo Sales Tracking */ $order = new Order($this->id_order); $products = $order->getProducts(); $productsKelkoo=array(); foreach ($products as $product) { $productKelkoo=array('productname'=>$product['product_name'], 'productid'=>$product['product_reference'], 'svn1'=>$product['product_quantity'], 'svn2'=>$product['unit_price_tax_incl']); array_push($productsKelkoo,$productKelkoo); } $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn(), 'products_json' => json_encode($productsKelkoo), 'sales' => $order->getOrdersTotalPaid(), 'orderid' => $this->id_order )); /* end Kelkoo Sales Tracking*/ parent::initContent(); $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() )); if ($this->context->customer->is_guest) { $this->context->smarty->assign(array( 'id_order' => $this->id_order, 'reference_order' => $this->reference, 'id_order_formatted' => sprintf('#%06d', $this->id_order), 'total_paid_tax_incl' => number_format($order->total_paid_tax_incl, 2, ',', ' '), 'email' => $this->context->customer->email )); /* If guest we clear the cookie for security reason */ $this->context->customer->mylogout(); } $this->setTemplate(_PS_THEME_DIR_.'order-confirmation.tpl'); } Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now