When searching by category, it may be useful to have images to click for subcategories rather than a list of names. This article will guide you through the steps on setting up subcategory images and having them listed in a section above the category's products .
Step-by-step Guide
Enable the Subcategory Images
First, we need to enable the subcategory images. If this has already been setup for you, please proceed to Setting up Subcategory Images.
- Login to your website's admin panel.
- On the left hand side, navigate to Stores > Configuration.
- Go to CPCommerce > Subcategory Images > General.
- Change Enabled to Yes.
- Press
.
- By default, all parent categories will show subcategory images.
Setting up Subcategory Images
- On the left hand side, navigate to Catalog Categories:
- In the category menu, on the left hand side there is a category navigation tree that looks like the following image. Navigate and click on the category you want to show a subcategory image for:
- Next, scroll down on the page and find the section labelled CPCommerce. Click on the section.
You should now see the following settings. You can adjust these according to your preferences:
- Show Subcategories - This sets whether a parent categoryshows subcategories or not.
- A parent category is any category with subcategories.
- This setting will show on all categories regardless of whether they have subcategories and can be disregarded in most cases.
- Subcategory Image- This sets what image you would like to show for the currently selected category. You can either upload an image or find one located in the website's media storage.
- By default, if a subcategory does not have an image, it will show its name.
- Subcategory Columns - This sets how many subcategory images will show in each row in a parent category.
- This setting will show on all categories and needs to be configured on the parent category.
- Show Subcategories - This sets whether a parent categoryshows subcategories or not.
- If you want to disable products from showing on category and only show the subcategory images:
- On the right hand side, click on the section labelled Display Settings.
- Next to Display Mode, click on the dropdown and select Static block only.
- On the right hand side, click on the section labelled Display Settings.
- Press
.
- Proceed to repeat steps 2 - 5 for the other categories you would like to set.
- Clear the cache by following our guide here: Magento 2: How to Refresh Cache