View Single Post
  #1  
Old 06-07-2006, 04:53 PM
 
MCM MCM is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 114
 

Default Listing Number of Items in a Category on the Menu

Hi,

Right now, my menu shows the number of products in any given category after the category name with the following code:

Code:
[*]<A href="home.php?cat={$categories[cat_num].categoryid}" class="VertMenuItems">{$categories[cat_num].category} ({$categories[cat_num].product_count|default:0})

The problem is that when products are out of stock, they don't appear in the listing, but they remain in the database. Therefore, I might have 15 items in a category, but only 10 in stock. Someone will see "Category (15)" on the menu, but only 10 products appear when they open the category page.

Do you know how this can be fixed? I don't want to delete items, because I've heard this messes up people's invoices (as well as our records).

Thanks!
__________________
Version 4.0.17/4.0.18
Reply With Quote