logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Monday, July 26, 2021 10:03:46 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 286

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
How do I implement the ShopBy feature in the left nav for search and category pages? I see there is code for ShopBy and have set up a product template with fields to use it, but I can't find the file for using it in the left nav. I added the Category Menu to the left nav of the category page.
Thanks

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyar  
#2 Posted : Monday, July 26, 2021 10:25:27 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
If I understand it correctly. There is a widget named "Product Finder". You need to drag and drop the widget at the desired location on the category page.

judy at Web2Market  
#3 Posted : Tuesday, July 27, 2021 7:48:13 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 286

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I had added the product finder. I just got it to work on a new dev site with AC test products and a template I added, so I'll keep trying on my other site.
judy at Web2Market  
#4 Posted : Tuesday, July 27, 2021 8:55:26 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 286

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I found out the issue with showing shopby in the left nav on my dev site. After I had changed the type of input on the inputfield to a dropdown box so that the shopby check box was enabled, I forgot to check that box. I am now seeing shopby choices in the left nav.
On my new dev site with AC products and no customizations, I see shopby choices in the left nav, showing the product count OK, but when I click one of the choices, it doesn't filter the products on the category page. It does filter the products on the search page. The categorycontroller, categorygridpage has IList<ShopByChoice> choices = new List<ShopByChoice>(); but that list is never populated.
If possible, please post a fix.
Thanks
shaharyar  
#5 Posted : Tuesday, July 27, 2021 10:26:27 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Thanks for the elaboration.

To fix, please try the following steps:
1- Open \Website\Controllers\CategoryController.cs
2- Search for

Code:
public ActionResult CategoryGridPage(CategoryGridPageParams parameters, int page = 1, int pageSize = 0, string sortExpression = "IsFeatured DESC, OrderBy ASC, Name ASC")


3- Replace with
Code:
public ActionResult CategoryGridPage(CategoryGridPageParams parameters, int page = 1, int pageSize = 0, string shopBy = "", string sortExpression = "IsFeatured DESC, OrderBy ASC, Name ASC")


4- Replace

Code:
IList<ShopByChoice> choices = new List<ShopByChoice>();


with

Code:
IList<ShopByChoice> choices = PageHelper.GetShopByChoices(shopBy);


5- Compile the code and use updated dll.

Hope this will fix the issue. Please make sure to test this solution locally before applying it on the live site.
Please mention if you need more help!
Users browsing this topic
Similar Topics
Adding ShopBy to category page (General Questions)
by judy at Web2Market 2/28/2022 8:23:33 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.