Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am creating a checkout ui extension that take cart subtotal and show a message. I am able to get the cart total using `useTotalAmount`. But, there is no way to get the subtotal.
If anybody know how to get subtotal in checkout ui extension using the documentation https://shopify.dev/docs/apps/checkout/custom
Did you ever find a solution? I am running into the same issue. Strange that there isn't a breakdown of all cart costs (subtotal, shipping, tax, etc) available in the cost object referenced here: https://shopify.dev/docs/api/checkout-ui-extensions/unstable/apis/standardapi
To get the subtotal, we looped through the lineitems and added the line amounts.
https://shopify.dev/docs/api/checkout-ui-extensions/unstable/react-hooks/cart/usecartlines
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025