# How the rules are applied

<figure><img src="https://2582339638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FagGARFBou99u1ioIn7vL%2Fuploads%2Fn0dXig7KvTfhfc9S4Oe7%2Frule%20apply.jpg?alt=media&#x26;token=6066800e-9018-4e94-92ad-31c9b0671abf" alt=""><figcaption><p>Rule application setting</p></figcaption></figure>

#### All applicable rules

All applicable rules will be applied based on their position in order list (top-down)

*Example:* You have **2 product pricing rules**, and Beanie price is **$20** and **Album price** is **$15**

* Rule 1: Discount $5 when you buy Beanie product.
* Rule 2: Discount 20% when buying from 3 to 4 Beanie

The scenario is:

* When you buy first item which is **Beanie**, you have discount **$5** **( rule 1 is applied )** => Your cart subtotal is **$15**
* When you buy another **Beanie, rule 1** is applied => Your cart subtotal is **$30. $15 x2** of **Beanie**
* When you buy another **Beanie**, **rule 1 and rule 2** are applied => Beanie price now is **$12**. After rule 1, price is **$15,** then **rule 2** affected, price is **$12**. => Subtotal is **$12 \* 3 = $36**

#### **The first applicable rule:**

The first matched rule will take effect, and all other rules following it will be ignored.

#### **Minimum discount amount:**

Rule will make smallest amount of adjustment to take effect.

*Example*: Beanie price is **$20**

* Rule 1: Discount $5 when buying a Beanie
* Rule 2: Discount 10% when buying a Beanie.

\=> Rule 2 will take effect ( The smallest amount of adjustment is **$2** )

#### **Maximum discount amount:**

Rule is the opposite of Minimum discount amount, it will make highest amount of adjustment to take effect.

#### **To non discount product**

Rule will only apply to products that are not on sale or have no discounts applied to them.

*Example:*&#x20;

* Rule 1: Discount 10% when buying a Beanie
* Rule 2: Discount 50% when buying a Cap, Beanie

⇒ Rule 2 will only take effect for Cap.
