# How i control many cart rule scenario

I am apply multiple cart rule in same time checkout page Please give me suggestion. The following scenario give below.

```Scenario # 1 - which is active on staging, but not working.
* Buy 3 of SKU: 0110025186 and get 15%
* Get 10% off on \$30 order with coupon: NEWYEAR
Expectations
* 15% off on SKU 0110025186
* User added a product that is not SKU 0110025186, since the cart is \$30+ a 10% is applied only to the 2nd product added and not to the SKU 0110025186 since this SKU already has 15% off.
Scenario #2 - All these rules are active and should work all together
* Sitewide Sale:
- 15% order \$30+
- 20% order \$35+
- 30% order \$50+
* Buy 3 Get of 12345678 SKU and get 15% off
Expectations:
* If user subtotal is \$52, apply \$15%
* If user:
Subtotal is \$45, and cart contains:
+ 3 of SKU 12345678 - \$10 x 3 = 30
+ 1 bible SKU 0987654 - \$12
+ 1 devotional AKU 98765432 - \$10
\$11.11 Apply discounts as follow:
+ \$4.5 (\$30 - 15% on SKU 12345678)
+ \$3.6 ( \$12-30% on SKU 0987654)
+ \$3 (\$10 -30%) on SKU 98765432)
We need to be able to combined coupons and different types of offer without double discounting.
```

To implement the multiple cart rules you described in the checkout page, you can follow these suggestions:

Scenario #1:

For the rule "Buy 3 of SKU: 0110025186 and get 15%":

1)Identify if the customer has added exactly three of SKU 0110025186 to the cart.

2)If the condition is met, apply a 15% discount to the SKU 0110025186.

For the rule "Get 10% off on \$30 order with coupon: NEWYEAR":

1)Check if the cart subtotal is at least \$30.

2)If the condition is met, apply a 10% discount to the second product added to the cart (excluding SKU 0110025186 if it's already present).

Scenario #2:

For the Sitewide Sale:

1)Determine the applicable discount percentage based on the cart subtotal: If the subtotal is \$30 or more, apply a 15% discount. If the subtotal is \$35 or more, apply a 20% discount. If the subtotal is \$50 or more, apply a 30% discount.

For the rule "Buy 3 Get of 12345678 SKU and get 15% off":

1)Identify if the customer has added exactly three of SKU 12345678 to the cart.

2)If the condition is met, apply a 15% discount to the SKU 12345678.

Combining coupons and different types of offers:

To prevent double discounts and ensure proper calculation, follow these guidelines:

1)Determine the order in which the discounts are applied.

2)Apply the highest discount first.

3)Exclude SKUs that already have a higher discount from further calculations.

4)Calculate the discount for each eligible SKU or item individually, based on the applicable rule or coupon.

5)Subtract the calculated discount from the corresponding SKU or item price.

6)Repeat the process for any remaining discounts.

By implementing these rules and guidelines, you can ensure that the cart rules and coupons work together without double-dipping and that discounts are applied correctly based on the specified conditions.