dalbornoz Posted January 29, 2015 Share Posted January 29, 2015 Hello, Is there a quick fix to remove the message "There are no products in this category." or do anyone knows in which tpl can I block this message. Thank you, Any help is greatly appreciated! Link to comment Share on other sites More sharing options...
mickeyboy1 Posted January 29, 2015 Share Posted January 29, 2015 If you are talking about the category page and you have no products in main categories then this is what i did.. I have no products in main categories, only in sub-categories so i edited themes/MY-THEME/category.tpl Find <div class="resumecat category-product-count"> {include file="$tpl_dir./category-count.tpl"} </div> and change it to {if $category->id_parent != 2} <div class="resumecat category-product-count"> {include file="$tpl_dir./category-count.tpl"} </div> {/if} assuming your category_id is the same Link to comment Share on other sites More sharing options...
dalbornoz Posted January 30, 2015 Author Share Posted January 30, 2015 Awesome, didn't find exactly the way you have described above. Probably because is an earlier version or my theme has a different Category.tpl. None-the-less, found were the call to category-count.tpl and commented the line below and that did the trick. <!-- <h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}"><span class="cat-name">{$category->name|escape:'html':'UTF-8'}{if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'}{/if}</span>{include file="$tpl_dir./category-count.tpl"}</h1> --> Thank you Link to comment Share on other sites More sharing options...
vekia Posted January 31, 2015 Share Posted January 31, 2015 in .tpl files instead od <!-- --> comment method use {* comment *} it's because with <!-- --> your smarty syntax is visible for public. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now