# Order discount based on shipping method selected

**URL:** <https://community.shopify.dev/t/order-discount-based-on-shipping-method-selected/9265>\
**Category:** Functions\
**Tags:** discount-functions\
**Created:** [February 24, 2025, 2:42pm UTC](https://community.shopify.dev/t/order-discount-based-on-shipping-method-selected/9265 "2025-02-24T14:42:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkutk](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dkutk](https://community.shopify.dev/u/dkutk)\
**Post date:** [February 24, 2025, 2:42pm UTC](https://community.shopify.dev/t/order-discount-based-on-shipping-method-selected/9265/1 "2025-02-24T14:42:58Z")

</div>

We’re looking to apply a percentage-off order discount when the customer selects a slower method of shipment. The current order discount limitations seem to indicate it’s not feasible (“Input `cart.deliveryGroups` is always an empty array for this function”), but wondering if I missed an alternative way. Thank you.

---

<div class="post-metadata">

**Author:** ![bkspace](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/bkspace/32/4501_2.png) [@bkspace](https://community.shopify.dev/u/bkspace)\
**Post date:** [March 3, 2025, 1:39pm UTC](https://community.shopify.dev/t/order-discount-based-on-shipping-method-selected/9265/2 "2025-03-03T13:39:04Z")

</div>

You’d need a checkout extension to populate a cart attribute with the selected delivery method.
