Cart api

Solved
Highlighted
Tourist
5 0 1

Hi,

I am using cart api's to update my cart. I have added a product for a collection based on the quantity. For eg if I add 6 products to the cart from same collection then a product will automatically be added to the cart. Now I want to update this added produuct price to 0. For the this product price is $14.95 I want to update it to $0.00 using api instead from the backend. I have tried update.js and change.js for this but couldn't make it. Can anyone please help me with this. 
How can I update price using update.js for a particular product in the cart?

 

Thanks. 

0 Likes
Highlighted
Shopify Partner
1168 32 214

This is an accepted solution.

@icodedev14  you can only update cart's note, attributes, or line item quantities with Ajax api. https://shopify.dev/docs/themes/ajax-api/reference/cart

How about adding different product with price 0 instead of $14.95

0 Likes