sarah3585 Posted November 29, 2010 Share Posted November 29, 2010 Hi,I have a shopping tab that links to all main categories so you can then drill down to the products within that category.I've achieved this by linking to /category.php?id_category=1The issue I have is that it displays 'There are no products' as there aren't, but it gives the wrong impression. The title of the page is Home and the breadcrumbs show Home > Home. I want to hide these items for this page but I want to have them on other category pages.So basicly i'm asking if there is a way to target these items just for this category page within the category.tpl page? Link to comment Share on other sites More sharing options...
rocky Posted November 30, 2010 Share Posted November 30, 2010 Change lines 7-14 of category.tpl (in PrestaShop v1.3.2) from: {if $nb_products == 0}{l s='There are no products.'} {else} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {/if} {/strip} to: {if $smarty.get.id_category != 1} {if $nb_products == 0}{l s='There are no products.'} {else} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {/if} {/if}{/strip} Link to comment Share on other sites More sharing options...
hotzenplotz Posted June 9, 2011 Share Posted June 9, 2011 Hi, I have something similar:there are subcategories full uf products, but when you go to "home" it sayz "there are no products" because the category has only sub categories.how can I make that dissappear?thanks! Link to comment Share on other sites More sharing options...
rocky Posted June 9, 2011 Share Posted June 9, 2011 Did you try my code above? It hides the "There are no products" message on the "Home" category. You can instead {* comment out *} the code if you want the message hidden on all categories. 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