Discounts work with Zapiet - Rates by Distance out of the box. This applies to any discount on the order, whether it's a Shopify discount code, an automatic Shopify discount, or a discount created by a third-party app.
Rates are calculated against the order total before any discount is applied. If a customer enters a discount code, the app still matches the rate against the original order total, so the rate shown at checkout is the one their pre-discount total qualifies for.
The post-discount cart total is not available through the Shopify Carrier Service API [Shopify limitation].
Which rates are affected
Discounts only affect price-based rates.
Weight-based rates are matched on the weight of the order, so a discount code never changes which rate is returned.
Example
A store has a price-based rate offering free delivery on orders over £90. A customer with a £100 cart applies a 20% discount code, bringing their total to £80.
The app still matches against £100, so the customer is offered free delivery even though they are paying £80.
If you're seeing a different rate than you expect after a discount is applied, let us know the details on chat and we'll be happy to help.
