I’m working on a JamStack eCommerce website using gatsby and Shopify. I have been able to fetch a customer’s orders using storefront API, the issue I’m facing is that I couldn’t get the discount amount on the order. (Custom discount) or any other discount.
That does return the discount applied either if it’s a percentage or an amount, but the issue again is I can’t get the subtotal before any discounts/duties are applied. I used
currentSubtotalPrice => $36,540.00
it still includes the custom order-level discount in it even though the docs say :
Order.currentSubtotalPrice: MoneyV2!
The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes are not included unless the order is a taxes-included order.
, normally it should return
$36,540.00 + $24,360.00 // should exclude the custom order-level discount