diff --git a/modules/ModuleCatalog.php b/modules/ModuleCatalog.php index 3240329..c1763f7 100644 --- a/modules/ModuleCatalog.php +++ b/modules/ModuleCatalog.php @@ -206,6 +206,8 @@ protected function parseProducts($objProducts, $blnAddCategory=false) { $arrProducts[] = $this->parseProduct($objProducts, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : '') . ((($count % $this->product_perRow) == 0) ? ' last_col' : '') . ((($count % $this->product_perRow) == 1) ? ' first_col' : ''), $count); } + + $arrProducts = array_chunk($arrProducts,$this->product_perRow); return $arrProducts; } @@ -376,6 +378,7 @@ protected function parseRelateds($objProducts, $blnAddCategory=false) { $arrProducts[] = $this->parseRelated($objProducts, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : '') . ((($count % $this->related_perRow) == 0) ? ' last_col' : '') . ((($count % $this->related_perRow) == 1) ? ' first_col' : ''), $count); } + return $arrProducts; } diff --git a/templates/modules/mod_catalog_list.html5 b/templates/modules/mod_catalog_list.html5 index e8282c7..f7ab1b1 100644 --- a/templates/modules/mod_catalog_list.html5 +++ b/templates/modules/mod_catalog_list.html5 @@ -5,7 +5,7 @@ products)): ?>

empty; ?>

- products); ?> + products as $products) { echo '
'.implode('', $products).'
'; } ?> pagination; ?>