X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Listing Number of Items in a Category on the Menu (https://forum.x-cart.com/showthread.php?t=22353)

MCM 06-07-2006 04:53 PM

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!

MCM 06-29-2006 11:21 PM

Does anyone have any advice on this? In setting up a new cart, I just ran into the problem again.

In this case, one of my test items (quantity: 1) was purchased. Now, of the original 3 items in its category, two are available. However, the category list still shows 3 available. I'm really at a loss for how to calculate this another way to avoid the glitch.

Thanks,

Jeremy

equinetackstore 07-20-2006 07:11 AM

Hi:

I'd be interested in knowing the fix to this as well for version 4.018.

If anyone has any ideas, please let us know.

Thanks in advance!


All times are GMT -8. The time now is 03:34 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.