CategoryMenu Shows Hidden and Private Categories

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
webmaz
Lieutenant (LT)
Lieutenant (LT)
Posts: 52
Joined: Wed Apr 14, 2010 3:57 pm

CategoryMenu Shows Hidden and Private Categories

Post by webmaz » Wed Sep 17, 2014 11:54 am

I'm looking to use the CategoryMenu [[ConLib:CategoryMenu CategoryId="-1" HeaderText="Categories"]] in the left sidebar, but it is showing hidden and private categories.
Is this the default? I'd like the menu to show public categories only.

Version: Gold R7

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: CategoryMenu Shows Hidden and Private Categories

Post by Katie » Wed Sep 17, 2014 12:38 pm

Yes, it's a bug that will be fixed in the next version. You can open \ConLib\CategoryMenu.ascs.cs and make the following change:

ON LINE 60, change FROM:

Code: Select all

IList<Category> categories = CategoryDataSource.LoadForParent(parentCategoryId, false);
TO:

Code: Select all

IList<Category> categories = CategoryDataSource.LoadForParent(parentCategoryId, true);
That should take care of it. You might need to recycle the application pool after making the change.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

webmaz
Lieutenant (LT)
Lieutenant (LT)
Posts: 52
Joined: Wed Apr 14, 2010 3:57 pm

Re: CategoryMenu Shows Hidden and Private Categories

Post by webmaz » Wed Sep 17, 2014 2:52 pm

This worked. Thanks!
It did result in an error at first, but after a refresh, the site was back up.

What's the best way to recycle the application pool?

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: CategoryMenu Shows Hidden and Private Categories

Post by jmestep » Thu Sep 18, 2014 3:32 am

The best way I have found is to make a change in the web.config file. Like set customerrors to Off if it is On, save the file. Then set it back again to what it was and save the file again. You can also make a change in the global.asax file.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply