Here is a scenario, I have a custom storefront and a discount code that gives 100% discount on shipping rates when the shipping costs less than $10.
This works fine on Shopify native checkout see screenshot below.
Now, when using GraphQL to get the same checkout object to render my custom checkout experience I can't find a way to figure out how to apply the discount only to a certain shippingRates when rendering the screen, see GraphQL responses for checkout.discountApplications and discount.availableShippingRates
Any help would be awesome!
We're currently facing the same problem. We're creating a custom checkout using the storefront API, but we're facing some issues with visualising a discount being applied to a shipping rate.
With the script editor, you can create a discount for a specific shipping rate. When using the storefront API, there's no way to link a shipping discount created with the script editor to a shipping rate.
However discounts being applied to a line item are collected in a discountAllocations array for each line item. Isn't this possible to do this as well for the shipping rates?
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |