PrestaShop. How to comment out the code in .tpl files

If you need to disable some action set in a .tpl file, you can comment it out. Commenting out is achieved by wrapping the code into {* *}.

For instance, if you want to remove the heading Subcategories on the category page, please do the next:
[notice type=”warning”]Make a backup of themes/themeXXX/category.tpl file.

  1. Open themes/themeXXX/category.tpl file for editing.
  2. Find {l s=’Subcategories’} and wrap it into {* *} so it looks like this:
  3. {*{l s=’Subcategories’}*}

  4. Save the changes.
  5. Clear Smarty cache and refresh your website to see the changes.

Hopefully, this tutorial was helpful for you.