# implement a free shipping promotion ON  purchases 10+

**URL:** <https://discuss.liferay.com/t/implement-a-free-shipping-promotion-on-purchases-10/1028>\
**Category:** Development\
**Tags:** commerce\
**Created:** [September 28, 2026, 9:35am UTC](https://discuss.liferay.com/t/implement-a-free-shipping-promotion-on-purchases-10/1028 "2026-09-28T09:35:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MahmoudRamadan](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@MahmoudRamadan](https://discuss.liferay.com/u/MahmoudRamadan)\
**Post date:** [September 28, 2026, 9:35am UTC](https://discuss.liferay.com/t/implement-a-free-shipping-promotion-on-purchases-10/1028/1 "2026-09-28T09:35:07Z")

</div>

Hi Liferay Community,

I am trying to implement a free shipping promotion (or $0 shipping cost) when a customer purchases **10 or more total items** in a single order, regardless of the specific product type or weight.

Here is what I’ve tried so far:

1. **Discounts Rules:** I looked under _Commerce → Discounts → Rules_, but the default rule types available are `Cart Total` (which evaluates total order amount/price), `Has All These Products`, and `Has Any of These Products`. None of these evaluate the **total quantity** of items in the cart.

2. **Variable Rate Shipping:** I checked _Channels → Shipping Methods → Variable Rate_, but the formula and settings only support weight (`Total Order Weight`) and order amount (`Order Subtotal`), rather than total item quantity.

**My Questions:**

1. Is there an out-of-the-box setting in Liferay Commerce to evaluate total cart item quantity for discounts or shipping?

2. If custom development is required, is implementing a custom `CommerceDiscountRuleEvaluator` OSGi component or CE the recommended approach? If so, could someone share a brief code snippet or best practice for iterating through `CommerceOrderItem` list to sum up quantities?

Thanks in advance for your guidance!
