Popular products for category page

Generates a list of popular products for the selected category based on the "Top Selling" items.

Wireframe

Category Popular Products


Preparation Checklist

Before you start this tweak, it's a good idea to run through our preparation checklist below:

  • Read through the Getting Started to get a better sense of how the Control Panel, Database and Front End store interact.
  • Learn our recommended Simple Workflow. This makes the implementation process as easy as possible.
  • Create a new Staging Theme for this tweak. This allows you to preview any changes before they are visible to live customers.

Coding Instructions

Step 1: Open the Category template

The category template can be found here /httpdocs/assets/themes/[THEME-NAME]/templates/cms/category.template.html.

Step 2: Add the code into the template

Paste the following code into the template where you would like the element to appear. This is most commonly placed before [%thumb_list type:'products' limit:'[@config:THUMB_LIMIT@]'%].

<!-- Popular Products -->
[%thumb_list type:'products' template:'' sortby:'top_sellers' limit:'4'%]
    [%param *header%]
        <section class="row products-row" aria-label="Popular Products">
            <div class="col-12">
                <h2>Popular Products</h2>
            </div>
    [%/param%]
    [%param *footer%]
            <div class="col-12">
                <hr>
            </div>
        </section>
    [%/param%]
[%/thumb_list%]

Final Result

Popular Products


Customising this Section

More information on how to customise this section can be found within the Thumb List Documentation.


Was this article useful?

Be notified when this page is updated. Optional.