[-] FO : fixed loop redirect when pagination have 0 product
This commit is contained in:
1 parent
9f474669e6
commit
20b87785e3
1 file changed
+1
-1
@@ -867,7 +867,7 @@ class FrontControllerCore extends Controller
|
|||||||
$this->context->cookie->nb_item_per_page = $this->n;
|
$this->context->cookie->nb_item_per_page = $this->n;
|
||||||
|
|
||||||
$pages_nb = ceil($nbProducts / (int)$this->n);
|
$pages_nb = ceil($nbProducts / (int)$this->n);
|
||||||
if ($this->p > $pages_nb)
|
if ($this->p > $pages_nb && $nbProducts <> 0)
|
||||||
Tools::redirect(self::$link->getPaginationLink(false, false, $this->n, false, $pages_nb, false));
|
Tools::redirect(self::$link->getPaginationLink(false, false, $this->n, false, $pages_nb, false));
|
||||||
|
|
||||||
$start = (int)($this->p - $range);
|
$start = (int)($this->p - $range);
|
||||||
|
|||||||
Reference in new issue
Block a user