New Shopify Certification now available: Liquid Storefronts for Theme Developers

Products updating in cart when there's no stock (Storefront API / Hydrogen)

6 0 1

Hello. I'm working on a store that's integrated with Hydrogen. I followed Shopify's tutorial on building a cart with Hydrogen and everything is working correctly, but I noticed something today: Using the LinesUpdate action, I'm able to exceed the current inventory of a product. I'm sure that there must be a check on stock after checkout, but this isn't exactly ideal from an UX standpoint.

Is there a way to check for inventory of a product inside the cart component? Or should the cart handler do it automatically, preventing users from requesting quantities that are not available, and I'm missing something? 

Thank you in advance!

Replies 0 (0)