How can I update the Cart line price to a custom price

How can I update the Cart line price to a custom price

Sheron112
Shopify Partner
2 0 1

Hi,

I've created a custom product template with 2 input fields: width & height which users can enter. Based on those input fields the price is manipulated, Currently it works fine on client-side(front end) since I'm just using simple java script to update the price elements. But I'm finding it quite difficult to update the price at cart level.  I believe I can simply use java script to show appropriate numbers but this won't update the final line price for checkout. How can I update the cart line items with custom code. Do I have to build an app to manipulate the cart.json data, if so what endpoints/queries/mutations can I use for updating the line_price/original_line_price/final_lineprice.

Replies 0 (0)