I have to make a little trick and not display all the products in the category page.
For example I have 20 products in one category (which is the parent category and have no children).
But, when I call the category page in the front store I want to display only a few products (based on some variables I might set later).
Here is what I have tried until now:
In catalog/view/template/product/category.tpl
Code: Select all
<div class="product-list">
<?php foreach ($products as $product) { ?>
<?php if ($product['product_id'] == '50') { ?> // I have added this line. Also I have closed the If, later, right after the foreach end.
<div>
I have also tried to filter the php in the controller but still no luck, or maybe I didn't know where to If them.
Any help appreciated
Thanks for reading