danielle85 Posted February 26, 2014 Share Posted February 26, 2014 (edited) Graag wil ik tradetracker gaan gebruiken op mijn prestashop-site, versie 1.4.7. Ik krijg alleen de trackingcode niet goed. In OrderconfirmationController.php heb ik nu: public function displayContent() { $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_products'=>$order->total_products_wt, 'description'=>$description )); parent::displayContent(); self::$smarty->display(_PS_THEME_DIR_.'order-confirmation.tpl'); } } En in order-confirmation.tpl staat de pixel: <img src="http://www.site.nl/kleding/conversion.php?campaignID=14519&productID=21572&conversionType=sales&https=0&transactionID={Tools::getvalue('id_order')}_formatted&transactionAmount='{$total_to_pay}'&email=email&descrMerchant={$description}&descrAffiliate={$description}" width="1" height="1" border="0" alt="" /> Echter als ik dit zo online zet komt er een witte pagina, als ik error-reporting aan zet krijg ik deze error: Fatal error: Call to a member function assign() on a non-object in/home/ufiqlaxk/domains/site.nl/public_html/controllers/OrderConfirmationController.php on line 93 Dat is de regel '($this->context->smarty->assign(array( ) ' Weet iemand wat er precies mis gaat? Edited March 5, 2014 by danielle85 (see edit history) Link to comment Share on other sites More sharing options...
scorpionsworld Posted February 26, 2014 Share Posted February 26, 2014 Graag wil ik tradetracker gaan gebruiken op mijn prestashop-site, versie 1.4.7. Ik krijg alleen de trackingcode niet goed. In OrderconfirmationController.php heb ik nu: public function displayContent() { $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_products'=>$order->total_products_wt, 'description'=>$description )); parent::displayContent(); self::$smarty->display(_PS_THEME_DIR_.'order-confirmation.tpl'); } } En in order-confirmation.tpl staat de pixel: <img src="http://www.site.nl/kleding/conversion.php?campaignID=14519&productID=21572&conversionType=sales&https=0&transactionID={Tools::getvalue('id_order')}_formatted&transactionAmount='{$total_to_pay}'&email=email&descrMerchant={$description}&descrAffiliate={$description}" width="1" height="1" border="0" alt="" /> Echter als ik dit zo online zet komt er een witte pagina, als ik error-reporting aan zet krijg ik deze error: Fatal error: Call to a member function assign() on a non-object in/home/ufiqlaxk/domains/site.nl/public_html/controllers/OrderConfirmationController.php on line 93 Dat is de regel '($this->context->smarty->assign(array( ) ' Weet iemand wat er precies mis gaat? Verander de regel $this->context->smarty->assign(array('total_products'=>$order->total_products_wt, 'description'=>$description )); eens in self::$smarty->assign(array('total_products'=>$order->total_products_wt, 'description'=>$description )); Link to comment Share on other sites More sharing options...
danielle85 Posted February 28, 2014 Author Share Posted February 28, 2014 Bedankt, de error is in ieder geval weg! 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