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
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025