Post by todavy » Sat Jul 31, 2021 6:53 pm

For OC 3.0.3.7 I found an easy way to make a category to show Latest products only, so I share it with everyone.

1. Activate and make a new instance of the Extentions - Extensions - Latest (Call it for exemple "Latest Products")
2. Make a new layout: Design – Layouts (Call it for example Latest products). Add the "Latest Products" module in the "Content Bottom". (Dont enter a "route")
3. Make a new category (Catalog - Categories) called "Latest Products" and change the "Layout Override" in the "Design" tab to "Latest Products" and perhaps a "Category" module in the "Column Left" if you like.
4. Small fixes: Empty the string in the ($_['heading_title'] = ' ') in the catalog/language/en-gb/extension/module/latest.php. (or else you will have double headings) and remove/comment the rows in the product / category.twig that sais that there is no products to show in the category and in that case displays a "Continue button":

Code: Select all

{#
      {% if not categories and not products %}
      <p>{{ text_empty }}</p>
      <div class="buttons">
        <div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
      </div>
      {% endif %}
#}
The only drawback to this method is:
1. If you end up with a category with no products there will not be an error saying this (and no "continue"-button)
2. There is no pagination, grid or sort function in the Latest module. You just have to set how many products to show there.

Please share any alternative sollution for this issue and if you know a way to fix the drawbacks as well.

New member

Posts

Joined
Tue Jun 10, 2014 5:00 pm
Who is online

Users browsing this forum: No registered users and 44 guests