How to – delete “0 products” text header in categories pages

by John on Nov.06, 2009, under Hints/Tips/Hacks

On the top of every category page it displays how many products are listed in that category, even if there aren’t any products.

In the category.tpl if you look for the following line of code:

{$nb_products|intval} {if $nb_products>1}{l s=‘products’}{else}{l s=‘product’}{/if}

and change it too:

{if $nb_products>0}{$nb_products|intval} {if $nb_products>1}{l s=‘products’}{else}{l s=‘product’}{/if}{/if}

This will still display how many products are in the category, aslong as there is some.

VN:F [1.9.3_1094]
Rating: 4.8/5 (4 votes cast)
How to - delete "0 products" text header in categories pages, 4.8 out of 5 based on 4 ratings
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MisterWong
  • Reddit
  • StumbleUpon
  • Twitter
  • Add to favorites
  • RSS
  • Technorati

Related posts:

  1. Frontpage Categories Module
  2. Modified Categories Block Module
  3. Change sub-categories to grid view
  4. Home featured products and new products SlideShow
  5. How to – add products to homepage featured products

:, ,

2 Comments for this entry

  • forex robot

    great post as usual .. thanks .. you just gave me a few more ideas to play with

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
  • Al

    Thanks for the Tip, saved me time in finding out. Please note that your browser or editor may change the ‘and so code may not work correctly. Just a note to check this…
    Cheers, Al

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)

Leave a Reply

Popular tags