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
ray22901031  
#1 Posted : Friday, May 6, 2022 10:37:55 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
We seem to be having problems with the feature products widget. It will only display products at the parent level, only if products exist directly at this level, not indirectly or below it.

Example using these categories:

RCA Radios - ID 290
---- RCA Commercial Portables - ID 291
-------- RCA BR200 Radios - ID 293
-------- RCA 152x0 Radios - ID 294
---- RCA Commercial Mobiles - ID 292

The main sub parent category is RCA Radios with two subcategories called commercial portables and commercial mobiles, the subcategory for commercial portables has two other subcategories, ID's 293 & 294

There are no direct products assigned to RCA Radios, ID 290
There are no direct products assigned to RCA Commercial Portables, ID 291
There are multiple products assigned to ID 293 & ID 294

When setting the feature products widgets to ID 290, nothing shows
When setting the feature products widgets to ID 291, nothing shows

When setting the feature products widgets to ID 293, all products for 293 will show
When setting the feature products widgets to ID 294, all products for 294 will show

The default setting for this is zero that shows everything underneath the main parent that is set to "Include product in Featured Listing"

I should be able to set the settings to ID 290, which is a sub parent of the main parent, and I'm expecting to display everything underneath, it does not. It will only display products that are directly linked to the category ID, not a parent above it.

I hope I have explained myself properly as this is critical for us, another option would be to take the multi-grid view widget (which works at the sub parent level, showing everything under it), and introduce a show only "Include product in Featured Listing" Option for this widget.

If this is an easy fix kindly let me know, if not I'm going to have to check with my developer to create a multi-grid view component that does work with sub parents with a "Include product in Featured Listing" Option.

Many Thanks,
-Ray

UPDATE: it also might provide better content to explain the purpose. We use the option "Include product in Featured Listing" to show sale items. We would like to create a contact page called "Items on Sale" that has two feature product wedgets. One would be for radios and the other one underneath would be for accessories. This helps when the customer is only interested to see what radios are on sale for the month, since all the items would be grouped together and vice a versa.

Edited by user Friday, May 6, 2022 10:45:07 PM(UTC)  | Reason: Not specified

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

nadeem  
#2 Posted : Tuesday, May 10, 2022 6:31:31 AM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 110

Thanks: 19 times
Was thanked: 18 time(s) in 18 post(s)
Hi Ray,

If you have the source code, you can update the GetFeaturedProducts function inside Products/ProductRepository.cs file to load featured products recursively.

To do this, locate the following line of code (around line #247)

Code:

criteria.Add(Subqueries.PropertyIn("P.Id", categoryFilter));


and replace with

Code:

if (recurse)
{
   criteria.Add(Subqueries.PropertyIn("P.Id", GetProductsLinkedToCategory(categoryId, recurse)));
}
else
{
    criteria.Add(Subqueries.PropertyIn("P.Id", categoryFilter));
}


where recurse is the bool flag sent via a parameter to function. When recurse = true, the featured products will be loaded from child categories recursively. Otherwise, it will work as currently is. Alternatively, you can replicate the same function in the front end code instead of using from ProductRepository.

Hope this helps!
ray22901031  
#3 Posted : Tuesday, May 10, 2022 8:44:47 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Yes, we do have the source code, and I do appreciate the suggestion. One idea is just to inherit from the current component and create a new one with this feature.

This might be a good idea for you guys to include in a future update, just have a checkbox as an option.

Just my thoughts, thank you so much for looking into this.

-Ray
Users browsing this topic
Guest (2)
Similar Topics
Problems with feature products widgets. (AbleCommerce 9 Bug Reports)
by ray22901031 3/11/2023 3:04:30 PM(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.