Display Category Grid on Homepage

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
illyrianmoon
Ensign (ENS)
Ensign (ENS)
Posts: 17
Joined: Thu Apr 07, 2011 4:31 pm

Display Category Grid on Homepage

Post by illyrianmoon » Mon Dec 09, 2013 10:56 am

Hi, all. On version 7, I had no problem modifying one of the category grid ConLib files so that it would display the root-level categories on the homepage, rather than the featured products grid. When I try to do the same in AC Gold, the page blows up. Has anyone been able to do this successfully? Thanks in advance.

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Display Category Grid on Homepage

Post by ForumsAdmin » Tue Dec 10, 2013 11:15 pm

When used on home page the category grid control fails to find the category id fails to take care of it at one place.
Thre is an easy fix. Just open ConLib\CategoryGridPage.ascx.cs and update the following code

Code: Select all

                    //REGISTER THE PAGEVISIT
                    AbleCommerce.Code.PageVisitHelper.RegisterPageVisit(_category.Id, CatalogNodeType.Category, _category.Name);
to

Code: Select all

                if(_category != null)
                {
                    //REGISTER THE PAGEVISIT
                    AbleCommerce.Code.PageVisitHelper.RegisterPageVisit(_category.Id, CatalogNodeType.Category, _category.Name);
                }

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Display Category Grid on Homepage

Post by ForumsAdmin » Tue Dec 10, 2013 11:16 pm

This update will be part of R7.

illyrianmoon
Ensign (ENS)
Ensign (ENS)
Posts: 17
Joined: Thu Apr 07, 2011 4:31 pm

Re: Display Category Grid on Homepage

Post by illyrianmoon » Wed Dec 11, 2013 2:41 pm

Thank you so much! That code change worked perfectly. The little things can really trip you up sometimes. :)

Post Reply