I'm trying to create a popup notification on a route that shows the current cart value (subtotal) and notifies users to add $X.XX to receive free shipping.
I have extended a route to add new functionality but I'm unsure whether a hook or service would be best/appropriate. I can't seem to find any documentation on cart value--I can see some functions for retrieving quantity of items and seemingly could calculate the price by retrieving the prices for each individual item but research isn't bringing up much.
I see information regarding Order Totals but one would seemingly have to finish the order process in order to retrieve that data. I'm trying to grab cart value when a user goes to the /cart
page.
I'm not asking for anything specific, just a pointer in the right direction. Thank you.