How to Display Subcategories on Category Page in Prestashop 1.7?

After upgrading PrestaShop 1.6, are you missing the absence of subcategories thumbnails on category page in PrestaShop 1.7 classic theme or other theme. Let’s take them back in a few simple steps!

1. To display subcategories thumbnails on category page

To change category.tpl file, Which is responsible for category page. Follow this path to locate the correct file: themes/classic/templates/catalog/listing/category.tpl

Open the file and paste the below code inside {block name=’product_list_header’}{/block} block, just before it closes:

Now, the modified file will looks like as below:

Related Read:  How to Find your Database Name for PrestaShop 1.7?

Above code checks if browsed category page contains any subcategories and if so – this code builds a list of available subcategory thumbnails.

subcategory-block-prestashop

To give a better look, let’s add the css!

2. Add CSS style to subcategory list

Open theme.css file, located in themes\classic\assets\css. At the very end, Add our css style as below:

Related Read:  How to Display Menu Thumbnails in PrestaShop 1.7 Main Menu?

subcategory-thumbnail-prestashop

You might need to change the style depending on your category thumbnail image size and Save and clear the cache. Now, It’s done!

If you have any doubts or question, you’re welcome to ask in comments.

2 Comments

  1. It works as promissed.
    Thank you!
    Karel

  2. I have one question… Is there a way to wrap the category text? Some of my sub categories are a bit longer and the category text is not wrapping. Appreciate any help.

Leave a Reply

Your email address will not be published. Required fields are marked *