How to update a cart based on user input

New Member
4 0 0



I am attempting to build an app following the Shopify tutorial for setting up a React / Node app ( and I had a question regarding updating the cart.


Essentially all I want to do is apply a discount in the cart using an API if a certain condition is met (e.g. they add a certain product to their cart). This tutorial is more focused on providing an Admin panel for the merchant, but I wanted to know how I would be able to implement that using the Node server in the app and in the storefront.


If someone could give me a rough idea, that would be greatly appreciated.