CategoryIcon (optional)

https://github.com/magesuite/category-icon

This module adds the possibility to upload an image per category, which is called the `category icon`. The module also provides a helper that allows displaying category icon on the front store.

 

Installation

This module is optional

composer require "creativestyle/magesuite-category-icon" ^1.0.0

Admin settings

In order to add a category icon enter Catalog -> Categories -> [category]

Inside Content tab, there is an additional input that allows uploading an image.

Backend

TODO - BE documentation and review of documentation is needed

Frontend

In order to show icons in the main desktop navigation set options in theme-creativeshop/src/MageSuite_Navigation/layout/default.xml

<referenceBlock name="navigation.main"> <arguments> <argument name="show_category_icon_subcats" xsi:type="boolean">true</argument> <argument name="show_category_icon_root" xsi:type="boolean">true</argument> </arguments> </referenceBlock>

After adding an icon in the admin panel to all or some categories and clearing the navigation cache, the icon will be visible next to the category. An additional class is added to easily style items with an icon.

 

In order to show icons in the mobile off-canvas navigation set options in magesuite-navigation/view/frontend/layout/navigation_mobile_index.xml For now, for mobiles onlu subcategories can have an icon.

<referenceBlock name="navigation.offcanvas"> <arguments> <argument name="show_category_icon_subcats" xsi:type="boolean">true</argument> </argument> </referenceBlock>