How to update a cart based on user input

Highlighted
New Member
4 0 0

Hello,

 

I am attempting to build an app following the Shopify tutorial for setting up a React / Node app (https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/set-up-your-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.

 

Thanks.

0 Likes