Skip to content

Commit

Permalink
add flex support
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidpeywasti committed Jan 8, 2016
1 parent 5164269 commit 320be99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions modules/ModuleCatalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion templates/modules/mod_catalog_list.html5
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<?php if (empty($this->products)): ?>
<p class="empty"><?php echo $this->empty; ?></p>
<?php else: ?>
<?php echo implode('', $this->products); ?>
<?php foreach($this->products as $products) { echo '<div class="row">'.implode('', $products).'</div>'; } ?>
<?php echo $this->pagination; ?>
<?php endif; ?>

Expand Down

0 comments on commit 320be99

Please sign in to comment.