Question about the Crossed-Out Price in the Shopping Cart

We used the compared price for our product and would like to show the compared price in the shopping cart. But in the shopping cart, it’s not the same as the setting.

https://prnt.sc/kAORFT_IZ2DA

On the product page, it’s correct. the fields of the crossed-out price for the shopping cart and product page are different.

Shopify Guide: https://shopify.dev/api/liquid/objects#line_item

Does anyone know how to correct this?

  1. What is this theme?

  2. Could you share the code for cart page

Hello, Lucid,
Thank you so much for this reply.

We don’t use the Shopify theme template. Our developers write the theme by themselves.

Here is the code of the cart page:

{% for cart in cart.items%}

  • {{cart.image.alt}}

    {% if cart.currency.iso_code == 'CAD' %} {{ cart.final_price | money_with_currency }} {% else %} {{ cart.final_price | money }} {% endif %} {% if cart.final_price != cart.original_price %}{{ cart.original_price | money }}{% endif %}

  • {% endfor %}

    And it can not get the original price, the original price is the same as the final price,

    https://prnt.sc/kAORFT_IZ2DA

    and then we changed this part

    {% if cart.final_price != cart.original_price %}{{ cart.original_price | money }}{% endif %}

    to

    {% if cart.final_price != cart.product.compare_at_price %}{{ cart.product.compare_at_price | money }}{% endif %}

    When we added the product to the shopping cart, the original price did not display, but when we refreshed the page and checked the shopping cart again, the original price was displayed.

    https://prnt.sc/15P3iKJ3GAMp

    Can you please help to locate the issue?

    Thank you for your help in advance!

    Luna