Jump to content
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • First Name
    Deepak
  • Last Name
    Gupta

[email protected]'s Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. function hookactionCartSave($params) { //print_r($params); if(!empty($param['cart'])) { $products = $this->context->cart->getProducts(); if(is_array($products) && count($products)>0){ foreach($products as $key => $val){ $product_id[] = $val['id_product']; $product_price[] = Product::getPriceStatic($val['id_product'], true, $val['id_product_attribute'], 2, null, false, true, 1); $product_quantity[] = $val['cart_quantity']; } $this->smarty->assign(array( //'product_id' => implode('|',$product_id), 'product_price' => implode('|',$product_price), 'product_quantity' => implode('|',$product_quantity) )); //print_r($product_id); //print_r($product_price); //print_r($product_quantity); //print_r($products->id); return $this->display(__FILE__, 'addcart.tpl'); $this->emptybag(); } } } getting error: Fatal error: Call to a member function getProducts() on null in C:\xampp\htdocs\prestashop\prestashop\modules\blockaffili\blockaffili.php on line 198 1. After this error if i refresh the page then its working fine even if i clicked again. 2. Not Working: Only When i click the add to card button after order confirmation .............. if i continuously click on add to card then its working fine ....................................................... i checked using print_r($param) that this happen when cart array is empty .........
  2. Hey, I have a tracking code which i used in my tpl file using Hookfooter i want oder information Order-Id or Order purchase value. And want to put that code on order-confirmation page using my module This is my tracking code <img style="position:absolute; visibility:hidden" src="http://www.ref-r.com/campaign/t1/settings?bid_e=6F969A60F73C2218B6913465A5194CFC&bid=52X&t=420&orderID={Unique order number like orderID or order reference}&purchase-value={purchased value}" />
×
×
  • Create New...