Display subcategories as clickable items

mathiasjohansso
Kilo Expert

Hi all!

I have a requirement from a customer to show subcategories as items in the "SC Category Page"-widget.

OOB, when a category does not have any orderable items, the page will only state that there are no items in the category, even if there are subcategories.

Is it possible to modify the widget and enable you to browse the categories?

1 ACCEPTED SOLUTION

kotiswaroop
Tera Expert

Hi Mathias,



You can clone the widget and modify the script as you like.


In the OOB page with id as 'sc_category' observe the url when you are clicking on a category. SC Category Page widget   will take the sysid of the category from url and will glide record sc_cat_item_category table to display the items related to it. Now what you need to do is instead of querying sc_cat_item_category table query sc_category table based on sysid from the url and use the all the oob code to collect subcategory info and displaying. At the same time modify the directive code as well in SC Categories widget. This is the widget which changes the url of the page [shows category navigation]. So you need to take care of the directive present in this.



Regards


Swaroop


View solution in original post

11 REPLIES 11

kalindaskalov
Giga Contributor

Hello,



I have noticed that after changing the script I get the subcategories shown as boxes but there are no pictures on the subcategories.
How can that be fixed ?


chaffou
Tera Expert

I tried to modify the script to get the subcategories but I not sure how to do this. Can you help me ?

Thank you!