Show popular items based on a specific category?

John Clyde Ap_a
Giga Expert

I wanted to only show the popular items based on a specific category

For this example, when the page loads, it'll only show the popular items for the category Cafe Drinks. find_real_file.png

7 REPLIES 7

Harish KM
Kilo Patron
Kilo Patron

Hi you need to clone SC Popular Items widget and need to add a line to query your item cateogories under server script .

add the below line in server script

count.addEncodedQuery('cat_item.category=e15706fc0a0a0aa7007fc21e1ab70c2f');// add here by filtering your category by going to sc_req_item list . Refer Screenshot

And then add your cloned widget by going to page designer and remove the OOB widget

Regards
Harish

Hi Harish,

I apologize for the trouble but I cannot seem to find the Item category in the filter.

find_real_file.png

 

find_real_file.png

Hi make sure you have submitted few requests for your catalog item. Then only you can have a filter. Popular items basically will see how many request items have been submitted for same item

Regards
Harish

Or you can add like this as well

count.addQuery('cat_item.category','SYSID of Category'); //instead of addEncodedQuery

Regards
Harish