sub-categories

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Reddirt
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 25
Joined: Sun Oct 26, 2008 7:05 pm

sub-categories

Post by Reddirt » Thu Nov 06, 2008 5:14 pm

Can you get sub-categories to show up - even if there are no products in the sub-category?

Thanks,
Reddirt

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: sub-categories

Post by mazhar » Fri Nov 07, 2008 6:40 am

Yes

mkeith1
Commander (CMDR)
Commander (CMDR)
Posts: 120
Joined: Wed Jul 25, 2007 12:46 pm
Contact:

Re: sub-categories

Post by mkeith1 » Mon Nov 10, 2008 10:33 am

How?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: sub-categories

Post by mazhar » Mon Nov 10, 2008 12:47 pm

Edit the ConLib/CategoryGridPage4.ascx.cs and locate the following lines of code

Code: Select all

if (node.CatalogNodeType == CatalogNodeType.Category)
                    {
                        addNode = (CatalogDataSource.CountForCategory(node.CatalogNodeId, true) > 0);
                    }
and comment out these lines as below

Code: Select all

/*if (node.CatalogNodeType == CatalogNodeType.Category)
                    {
                        addNode = (CatalogDataSource.CountForCategory(node.CatalogNodeId, true) > 0);
                    }*/
and it will start listing empty subcategories as well
Last edited by mazhar on Wed Nov 12, 2008 4:02 am, edited 1 time in total.

mkeith1
Commander (CMDR)
Commander (CMDR)
Posts: 120
Joined: Wed Jul 25, 2007 12:46 pm
Contact:

Re: sub-categories

Post by mkeith1 » Tue Nov 11, 2008 5:56 pm

what lines of code?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: sub-categories

Post by mazhar » Wed Nov 12, 2008 4:06 am

what lines of code?
Find and comment out the following code in CategoryGridPage4.ascx.cs file

Code: Select all

if (node.CatalogNodeType == CatalogNodeType.Category)
                    {
                        addNode = (CatalogDataSource.CountForCategory(node.CatalogNodeId, true) > 0);
                    }

Post Reply