How to Add Product Attribute to Sales Rules Conditions in Magento 2
Magento 2 allows creating product attributes easily.
Product attributes make it easy to manage the products based on their characteristics. They describe the products more specifically and sets it apart from other products.
This post is all about how to add product attribute to sales rules conditions in Magento 2.
Primarily, the sales rules conditions are useful when a store owner wishes to give discounts on specific products. However, the discount strategy amidst cutthroat competition needs to be meticulously drafted.
If the store owner wants to offer a discount on a particular product only and that too for a specific product attribute only, the below method is usful.
Once a merchant adds product attribute to sales rules condition, the condition will be applied everywhere on the storefront.
For instance, you can offer a discount on a product having a colour blue. A smartphone with less popular colour can be sold at discounted prices. Thus, adding the colour attribute to sales rule conditions can be done easily from the admin panel itself.
Steps to Add Product Attribute to Sales Rules Conditions in Magento 2
- Login to Magento 2 admin panel.
- Navigate to Stores > Attributes > Product
- Select a product attribute and navigate to Storefront Properties
- Set Use for Promo Rule Conditions to Yes
- Now, go to Marketing > Cart Price Rules
- Open the required cart price rule.
- Expand the Condition section and select product attribute based on your business requirement
- For instance, here I have selected Color as a product attribute and condition is on color blue.
- Click Save
This shows the sales rules condition is applied for the product Luma Water Bottle having color blue.
That’s it.
If you have queries regarding this blog, feel free to ask in the Comments section below.
I would be happy to answer your queries.
Do consider sharing this post with Magento Community via social media.
Thank you.
Dipali Bhalala
Dipali is a Magento support executive at Meetanshi. Along with work, she is into painting, reading fiction novels, and Korean dramas!
Prev
How to Add Date Using Dynamic Field in system.xml File in Magento 2
How to Get Product URL for Specific Store in Magento 2
Next