Why is my Shopify cart not showing discounted prices correctly?

Topic summary

Issue: The Shopify cart (Charlotte theme) fails to show a strike-through “original” price and a red “sale” price; it only shows the current price with no discount indication. The poster found their Liquid conditional for highlighting discounts is never true because original_line_price always equals final_line_price, seemingly ignoring the product’s Compare at price.

Technical context: Liquid is Shopify’s templating language. In Shopify, compare_at_price is the pre-discount price, while price is the current selling price; original_line_price and final_line_price are cart line-item amounts.

Attempts: They tried using a conditional like {%- if product.compare_at_price != product.price -%} but still saw no difference in prices. A code screenshot was shared, but it’s not clearly visible and may be central to diagnosing the logic.

Latest guidance: A responder suggested using {%- if item.compare_at_price > item.price -%} to detect discounted items. They also requested the store URL to better understand the implementation.

Status: No confirmed fix yet; the thread remains open. Next steps include updating the Liquid condition and sharing the store URL for further review.

Summarized with AI on February 13. AI used: gpt-5.

This is my first time using Shopify and Liquid. I currently have a problem with my shopping cart with the Charlotte theme. I’d like my shopping cart to show the original price of a customer’s item with a strike-through and the sales price in bold red. My cart won’t do this, it just shows whatever the price of the item is without any indication that it was on sale. After testing, I’ve found that the problem is that the highlight conditional statement never proves to be true. No matter the item, the original_line_price comes back as the same as the final_line price. It’s like it’s ignoring the product’s “Compare at price” amount and using the “price” amount only for both the original_line_price and final_line price. I can’t figure out why the website is doing this! I’ve also tried replacing the conditional statement with {%- if product.compare_at_price != product.price -%} Please let me know if this all makes sense and how I could fix this problem!

image of code: https://i.stack.imgur.com/IeJRw.pngglobaltech

Hi @jemes94

I understand your concern. I reviewed your shared screenshot but it’s not properly visible. Please add this condition {%- if item.compare_at_price > item.price -%}. I hope this can help you to resolve the issue.

If possible please share the URL of the store so I can get a proper idea about it.