dhada Posted November 7, 2010 Share Posted November 7, 2010 Why Home Category category.php?id_category=1 (There are no products.)?But in my home featured the product is showing...Thanks... Link to comment Share on other sites More sharing options...
dhada Posted November 7, 2010 Author Share Posted November 7, 2010 I already solved my problem by... Thanks...At Line 54 of category.php if ($category->id != 1) { $nbProducts = $category->getProducts(NULL, NULL, NULL, $orderBy, $orderWay, true); include(dirname(__FILE__).'/pagination.php'); $smarty->assign('nb_products', $nbProducts); $cat_products = $category->getProducts(intval($cookie->id_lang), intval($p), intval($n), $orderBy, $orderWay); } add this code after... else{ $nbProducts = $category->getProducts(NULL, NULL, NULL, $orderBy, $orderWay, true); include(dirname(__FILE__).'/pagination.php'); $smarty->assign('nb_products', $nbProducts); $cat_products = $category->getProducts(intval($cookie->id_lang), intval($p), intval($n), $orderBy, $orderWay); } Link to comment Share on other sites More sharing options...
olsesacl Posted November 16, 2011 Share Posted November 16, 2011 It does not work in version 1.4.5.1, any way to do it? Link to comment Share on other sites More sharing options...
olsesacl Posted November 16, 2011 Share Posted November 16, 2011 In version 1.4.5.1 edit: if ($this->category->id != 1) to: //if ($this->category->id != 1) and change: if(!$hookExecuted) // The hook was not executed, standard working { self::$smarty->assign('categoryNameComplement', ''); $this->nbProducts = $this->category->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true); $this->pagination((int)$this->nbProducts); // Pagination must be call after "getProducts" $this->cat_products = $this->category->getProducts((int)(self::$cookie->id_lang), (int)($this->p), (int)($this->n), $this->orderBy, $this->orderWay); } else // Hook executed, use the override to: /* if(!$hookExecuted) // The hook was not executed, standard working {*/ self::$smarty->assign('categoryNameComplement', ''); $this->nbProducts = $this->category->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true); $this->pagination((int)$this->nbProducts); // Pagination must be call after "getProducts" $this->cat_products = $this->category->getProducts((int)(self::$cookie->id_lang), (int)($this->p), (int)($this->n), $this->orderBy, $this->orderWay); /*} else // Hook executed, use the override*/ Link to comment Share on other sites More sharing options...
senatoring Posted December 9, 2011 Share Posted December 9, 2011 ((((( if(!$hookExecuted) // The hook was not executed, standard working { self::$smarty->assign('categoryNameComplement', ''); $this->nbProducts = $this->category->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true); $this->pagination((int)$this->nbProducts); // Pagination must be call after "getProducts" $this->cat_products = $this->category->getProducts((int)(self::$cookie->id_lang), (int)($this->p), (int)($this->n), $this->orderBy, $this->orderWay); } else // Hook executed, use the override )))) -------------------------- Hi-Im not fond this code im same problem My presta 1.4.4.1 ------- Please Help me Link to comment Share on other sites More sharing options...
sbm Posted July 23, 2012 Share Posted July 23, 2012 How to do this in presta 1.4.8.2 please? Link to comment Share on other sites More sharing options...
Recommended Posts