Hello Magento Folks,

How are you all working? In this article, I will help you How to Add Filterable Product Attribute in Products in Category in Magento 2. In the previous article, I have illustrated How to Upload a Product Image Placeholder in Magento 2. Let’s get started with today’s topic.

Quick Intro:

Basically, product attributes are known as the properties of the products. The store admin can effortlessly create the product attribute as per the requirement. For filtering the product attribute in category products you will require a filterable product attribute option in Magento 2. In this tutorial, I will help to Add Filterable Product Attribute in Products in Category in Magento 2.

Steps to Add Filterable Product Attribute in Products in Category in Magento 2:

Step 1: Firstly go to Stores > Attributes > Product and tap on the Add New Attribute option:

Default Label: Add your label name here we have taken Featured Product here.
Catalog Input Type for Store Owner: We have selected YES/NO from the dropdown.
Attribute Code: Add the attribute code here.

Tap to Save Attributes

Config_1

Step 2: Create a di.xml file at

File path: app\code\Vendor\Extension\etc\adminhtml\di.xml

Step 3: Create a file namely Product.php at

File path: app\code\Vendor\Extension\Block\Adminhtml\Category\Tab\Product.php

That’s It after the implementation of the above steps you will be capable of filtering the products in the category by the added filterable product attribute.

Config_2

That’s It you have successfully added Filterable Product Attribute in Products in Category in Magento 2

Wrap Up:

Hopefully, all are able to apply the above-given solution in their Magento 2 stores. In case of any issues you face during the implementation of the above codes then let me know in the comment section below. 

Share the blog with your Magento Friends via the social media platform.

Happy Reading.   

Click to rate this post!
[Total: 6 Average: 5]