We need to read the discounted price of each item in the shopping cart from the customer’s cart.js file. If the shopping cart uses a sitewide discount based on the total order value, the “line_price” in cart.js shows the correct discounted price. However, the documentation at Liquid objects: line_item states that line_price is being deprecated.
Can anyone tell me if I can still trust and use line_price?
Moved this over to the theme development board ![]()
Hey @max2006 , I would recommend to use final_line_price instead. It returns the correct discounted total for each line item in cart.js. The line_item documentation covers this field, and the Cart Ajax API reference shows the full response structure.
For context, line_price is deprecated because it doesn’t include automatic discounts or discount codes. final_line_price captures all discount types, so it’s the reliable choice going forward.
However, in the example I screenshotted, the original price of the product is 1000, and the total order discount is 60, but the final_line_price is still 1000, without the discount being deducted.
Conversely, the line_price correctly shows the discounted price of 940.
@KyleG-Shopify Please take a look, thank you.
No need to tag staff @max2006 - we’ll respond as soon as we can.

