When developing the administrative part of a module, it is often necessary to limit text field for the number of characters entered. To indicate the maximum length you can use the attribute of the tag input maxlength. Also you can use the rules of the object Validator: (more…)
You can find Catalog Price Rules in the Marketing -> Promotions section. With their help you can easily add or manage all sorts of promotions. To start creating your sale press Add New Rule Button in the upper-right corner of the screen.
The first tab is – Rule Information where you can configure general options such as Rule Name, Description etc.
Let’s look over the options:
- Rule Name – here you should enter the name of your rule. Type a name here which will help you remember what the rule is about. (This name will not be displayed in the catalog).
- Description – you can type any information related to the rule. (also not shown on the frontend).
- Status – specifies whether your catalog price rule is active or not.
- Websites – select website(s) on which the price rule will apply.
- Customer groups – rules can be used to control prices for different customer groups. If you are using the sample data, you’ll see that the “Retailer” group is not selected. So, if a customer belongs to this group, he will get a regular price. Select all groups if you want the rule to be universal.
- From Date and To Date – these two options specify a period for which the rule will be valid. You can either print the date or choose it from the calendar which is situated on the right side of the box.
- Priority – this field determines which price rule (in case you have more than one) should be applied first in the order in which the matching rules should be applied. The rule with the lower number for priority goes earlier than with higher number.
The second tab on the Promotion page called Conditions. It is situated to the left under the Catalog Price Rules. So, on this page you will see the text determining that all conditions that you add are true so that the rule is applied.
Generally, rule condition consists of two parts: a combining condition and one or several sub-conditions. The sub-conditions are tied together by a combining condition. Moreover, you can change conditions ANY to ALL or/and TRUE to FALSE and eventually get a combining condition – If ALL of these conditions are FALSE.
You can also set multiple sub-conditions by clicking “+” button. This will open a drop-down list with product attributes. Here you can either choose the condition or select the option which helps you to make a complex combination of conditions. It is useful in case you want to have some of the conditions TRUE and others to be FALSE in order for the price rule to be applied. To make this, in the drop-down menu choose the field called Conditions Combination.
The last tab on the Promotions page is – Actions. Here you can find the following settings:
Apply – this option helps you to select how the discount will apply.
You can choose:
- Apply as the Percentage of the Original – this means that the discount is calculated as the percentage of the price. For example, if the product costs 50$ and we have 10% discount the final price with discount will be 45$.
- Apply as Fixed Amount – this means that you will subtract a fixed sum from your original price. For example, if the product costs 50$ and discount is 10 the final price will be 40$.
- Adjust Final Price to this Percentage – this means that the final price is calculated as a percentage OF THE ORIGINAL. For example, if the product costs 50$ and we have 10% discount the final price will be 5$.
- Adjust Final Price to Discount Value – this means that the number you put in the Discount Amount field is the final price. For example you set 10 in the field, so your final price now is 10 no matter what was your original.
Discount Amount field – here you should set the amount of you discount.
Subproducts Discount – by default it is set to NO, so if you want to enable you should switch it into YES.
Discard subsequent rules – if you have more than one rule and in some situation all the conditions of two or more rules are fulfilled, then all the rules that meet the requirements will be applied. If you want only this particular rule to apply set this option into YES.
So, now everything is set. The last thing that you have to do is just do not forget to Save all your changes.
Video guide on how to Create New Catalog Price Rule in Magento 2.0