Creating a Sale category with all products you have special offers for is one of the best marketing practices. So, how can you create the Magento 2 sale category?
You definitely can add or remove all the products from the sale category manually or with the CSV import, but it is really time-consuming. Doing this manual job on a daily or hourly basis you lose your time. Every business has to optimize their processes to move forward.
To automate the catalog management you can use dynamic category rules, but what is it? The dynamic category, judging from its name, is a category that is predetermined to be generated automatically. All you need to do is set a rule and a cron script will arrange category products.
As an example, create a dynamic category rule for Sale Category in category Men that will automatically assign all Men's discount products to category Sale. To do this use the Magento 2 Dynamic Categories Extension. (In this guide we use vanilla Magento 2 with Sample Data and empty "Men > Sale" category).
Watch this short video to go through the whole process of the automatic sale category creation process or follow the step-by-step instructions below.
In order to create a new Dynamic Category Rule go to Catalog > Dynamic Category > Rules.
Then, press the Add New Rule button to start working with the sale automatic category rule.
Now fill in the rule form:
1. Enable Rule.
2. Set the Rule Name. Note: that when creating a rule for several Sale categories (e.g. Men, Woman, Gear, etc.) it's better to mark the category you create this sale rule for in the rule name.
3. Add the rule Description. This field is optional you can leave here any note if you want to.
4. Set rule Priority which defines how the rule is processed. The higher the number the later it will be processed.
5. Choose Category Type - Static.
6. In the Categories field, choose Men > Sale as it is the category you want the rule to be applied to.
7. Set the Web Sites the Sale Rule will be assigned to.
8. Choose what to Apply the rule By: On Product Save, Cron, Manually or All Events.
9. Enable the Remove Products from Other Categories option if you want products you generate by the rule to be removed from the original category while added to the dynamic category.
10. Enable the Remove Other Products from Category option in case there were manually added products in the Sale category before and you want only products generated by the rule to be there now.
11. Choose whether to Use Products from Catalog Price Rules.
Note: catalog price rule should be active and assigned to the guest customer group to be used in a dynamic category.
12. Finally, set the conditions under which products will automatically assigned to the Sale category. Let's say you want to put there all discount products from the Men category (e.g. Tops, Bottoms) which Is on Sale options is Yes. Note that "Is on Sale" attribute is generated for products automatically.
Once you finish and press the Save Config button there appears a notification about the successful creation of the rule, but that doesn't mean it is applied. The dynamic categories module has the cron script which runs by schedule, so that means it takes some time before the rule is applied. You can wait, but if you want the rule to be applied immediately, press the Apply Rules button.
So that's it. Now you should be able to create the automatic sale category for your Magento 2 store. Not already convinced? Check out the live demo to create the dynamic category yourself and start benefiting from it right away.