Show crossed out prices in cart

Hello,

I would like to display the crossed out prices in my cart and on the payment page.

On my product page the crossed out price is displayed correctly.

In the basket, the crossed out price is not displayed as it should be.

On the checkout page, the crossed out price is not displayed either, as it should be.

How can I display the crossed out price in the basket and on the payment page please!?

Don’t hesitate to ask me for a copy of the code you need to take a look, I can send the liquid or other files if necessary… Thank you in advance for your help

Thank you for answering.

I already controled settings to see if the theme allowed me to enable or customize how prices are displayed but it is not possible by this way.

Here is a copy of the file “cart-template.liquid” :

{%- liquid
    assign isRtl = false
    assign lisRtl = 'ar,dv,ha,he,ku,fa,ur,ug' | split: ','
    if lisRtl contains request.locale.iso_code or settings.rtl
        assign isRtl = true
    endif
-%}

{%- liquid
   assign secSt = section.settings
  assign giftpr = all_products[settings.gift_product]
  assign giftprc = giftpr.selected_or_first_available_variant.price | money
  assign giftId = giftpr.selected_or_first_available_variant.id
  assign isGift = true

  assign shipProd = all_products[settings.free_ship].price | minus: cart.total_price
-%}
{{ cart.item_count }}
{% capture freeAmount %}**{{shipProd | money}}**{% endcapture %}
{%- if settings.free_ship != blank and settings.free_ship_msg != blank -%}
  
 {% if shipProd > 0 %}{{settings.free_ship_msg | replace: '$',freeAmount }}{% else %}{{settings.got_free_ship }}{% endif %}

{%- endif -%}
{% capture cartTable %}

    {% if settings.show_multiple_currencies and settings.currency_opt == 'script' and section.settings.currency_notes != blank %}
        {{ section.settings.currency_notes | replace: '[selected.currency]','' | replace: '[shop.currency]',shop.currency }}

    {% endif %}
{% endcapture %}
{% capture cartSummery %}

  {% for block in section.blocks %}
      {%- assign blkSt = block.settings -%}
      {%- if block.type == 'sub' -%}
          

            {{ 'cart.general.subtotal' | t }}
            {{ cart.total_price | money_with_currency }}
          

          {%- if cart.cart_level_discount_applications.size > 0 -%}
              
                  {%- for discount in cart.cart_level_discount_applications -%}
                      - {{ discount.title }}(-{{ discount.total_allocated_amount | money }})
                      {% assign discountCodeSave = discount.total_allocated_amount %}
                  {%- endfor -%}
              

          {%- endif -%}

          {% if blkSt.save %}
          {% assign savings = 0 %}
              {% for item in cart.items %}
                  {% if item.variant.compare_at_price > 0 %}
                      {%- if item.original_price != item.final_price -%}
                          {% assign difference = item.variant.compare_at_price | minus: item.final_price %}
                      {% else %}
                          {% assign difference = item.variant.compare_at_price | minus: item.original_price %}
                      {% endif %}
                      {% assign savings = savings | plus: difference %}
                      {% assign actualSaving = savings | times: item.quantity %}
                  {% elsif item.original_price != item.final_price -%}
                      {% assign difference = item.original_price | minus: item.final_price %}
                      {% assign savings = savings | plus: difference %}
                      {% assign actualSaving = savings | times: item.quantity %}
                  {% endif %}
              {% endfor %}
      
              {% if savings > 0 %}
                  
                      {{ 'cart.general.savings' | t }}:
                      {{ actualSaving | plus: discountCodeSave | money }}
                  

              {% endif %}
        {% endif %}
      {%- elsif block.type == 'ship' -%}
        {% capture freeAmount %}**{{shipProd | money}}**{% endcapture %}
        {%- if blkSt.freeship and settings.free_ship != blank and settings.free_ship_msg != blank -%}
          
 {% if shipProd > 0 %}{{settings.free_ship_msg | replace: '$',freeAmount }}{% else %}{{settings.got_free_ship }}{% endif %}

        {%- endif -%}
      
        {%- if blkSt.shippingTax -%}
          
              {%- if cart.taxes_included and shop.shipping_policy.body != blank -%}
                  {{ 'cart.general.taxes_included_and_shipping_policy_html' | t: link: shop.shipping_policy.url }}
              {%- elsif cart.taxes_included -%}
                  {{ 'cart.general.taxes_included_but_shipping_at_checkout' | t }}
              {%- elsif shop.shipping_policy.body != blank -%}
                  {{ 'cart.general.taxes_and_shipping_policy_at_checkout_html' | t: link: shop.shipping_policy.url }}
              {%- else -%}
                  {{ 'cart.general.taxes_and_shipping_at_checkout' | t }}
              {%- endif -%}
          

        {%- endif -%}
      {%- elsif block.type == 'btn' -%}
          {%- if settings.terms_checkbox -%}
          

            
          

          {%- endif -%}

           
          {% if blkSt.continue %}{{ 'cart.general.continue_shopping' | t}}{% endif %}  
          {% if blkSt.additionalCheckout and additional_checkout_buttons %}
{{ content_for_additional_checkout_buttons }}
{% endif %}
          

      {%- elsif block.type == 'img' -%}
          {%- if blkSt.payment != blank -%}
{%- endif -%}
      {% endif %}
    {% endfor %}

{% endcapture %}

{% capture giftWrap %}
{% if isGift and settings.giftwrap and giftpr != blank %}
    
        
    

{% endif %}
{% endcapture %}
{% capture cartNote %}
    {% if settings.cartnote %}
        
    {% endif %}
{% endcapture %}
{% capture coupon %}
    {% if settings.coupon %}
        
    {% endif %}
{% endcapture %}

{%- if settings.breadcrumb_pg -%}{%- render 'breadcrumb' -%}{%- else -%}

{%- endif -%}
  

    

 

{% if section.settings.shipping_calculator %}

{% endif %}

{% comment %} {%  endcomment %}
{% schema %}
  {
    "name": "Cart Page",
    "settings": [
      {
        "type": "select",
        "id": "layout",
        "label": "Layout Style",
        "default": "style1",
        "options": [
          {
            "value": "style1",
            "label": "Style 1"
          },
          {
            "value": "style2",
            "label": "Style 2"
          }
        ]
      },
       {
        "type": "color",
        "id": "cart-header",
        "label": "Cart Header Background",
        "default": "#f5f5f5"
      },
      {
        "type": "color",
        "id": "cart-summery",
        "label": "Cart Summery Background",
        "default": "#f5f5f5"
      },     
      {
        "type": "header",
        "content": "Currency Note"
      },
      {
        "type": "textarea",
        "id": "currency_notes",
        "label": "Notes",
        "default": "We processes all orders in [shop.currency]. While the content of your cart is currently displayed in [selected.currency], the checkout will use [shop.currency] at the most current exchange rate.",
		"info": "Use [shop.currency] for default currency and [selected.currency] for adtivated currency on store."
      }, 
	  {
        "type": "header",
        "content": "Shipping Rates Calculator"
      },
	  {
        "type": "checkbox",
        "id": "shipping_calculator",
        "label": "Show?",
        "default": true
      },
      {
        "type": "text",
        "id": "shipping_calculator_heading",
        "label": "Heading text",
        "default": "Get shipping estimates"
      },
      {
        "type": "text",
        "id": "shipping_calculator_default_country",
        "label": "Default country selection",
        "default": "United States"
      },
      {
        "type": "paragraph",
        "content": "If your customer is logged-in, the country in his default shipping address will be selected. If you are not sure about the  spelling to use here, refer to the first checkout page."
      },
      {
        "type": "text",
        "id": "shipping_calculator_submit_button_label",
        "label": "Submit button label",
        "default": "Calculate shipping"
      },
      {
        "type": "text",
        "id": "shipping_calculator_submit_button_label_disabled",
        "label": "Submit button label when calculating",
        "default": "Calculating..."
      },
      {
        "type": "select",
        "id": "btn-style3",
        "label": "Button Design",
        "default": "btn",
        "options": [
          {
            "label": "Solid Button 1",
            "value": "btn"
          },
          {
            "label": "Solid Button 2",
            "value": "btn2"
          },
          {
            "label": "Solid Button 3",
            "value": "btn3"
          },
          {
            "label": "Border Button 1",
            "value": "bdr-btn1"
          },
          {
            "label": "Border Button 2",
            "value": "bdr-btn2"
          }
        ]
      }
	],
    "blocks": [
        {
          "type": "sub",
          "name": "Sub Total",
          "limit": 1,
          "settings": [
         	  {
                "type": "checkbox",
                "id": "save",
                "label": "Display Total Savings?",
                "default": true
              },
              {
                "type": "color",
                "id": "cl",
                "label": "Color",
                "default": "#4eaf13"
              }
          ]
        },
        {
          "type": "btn",
          "name": "Checkout Button",
          "limit": 1,
          "settings": [
            {
              "type": "select",
              "id": "btnst",
              "label": "Checkout Button Design",
              "default": "btn",
              "options": [
                {
                  "label": "Solid Button 1",
                  "value": "btn"
                },
                {
                  "label": "Solid Button 2",
                  "value": "btn2"
                },
                {
                  "label": "Solid Button 3",
                  "value": "btn3"
                },
                {
                  "label": "Border Button 1",
                  "value": "bdr-btn1"
                },
                {
                  "label": "Border Button 2",
                  "value": "bdr-btn2"
                }
              ]
           },
             {
      		"type": "checkbox",
              "id": "continue",
              "label": "Display Continue Shopping Buttons?",
      		"default": true
            },
            {
              "type": "select",
              "id": "btn-style2",
              "label": "Button Design",
              "default": "bdr-btn1",
              "options": [
                {
                  "label": "Solid Button 1",
                  "value": "btn"
                },
                {
                  "label": "Solid Button 2",
                  "value": "btn2"
                },
                {
                  "label": "Solid Button 3",
                  "value": "btn3"
                },
                {
                  "label": "Border Button 1",
                  "value": "bdr-btn1"
                },
                {
                  "label": "Border Button 2",
                  "value": "bdr-btn2"
                }
              ]
           },
           {   
      		"type": "checkbox",
              "id": "additionalCheckout",
              "label": "Display Additional Checkout Buttons",
      		"default": false,
              "info":"load dynamically from shopify server"
            }
          ]
        },
        {
          "type": "ship",
          "name": "Shipping Message",
          "limit": 1,
          "settings": [
            {
              "type": "checkbox",
              "id": "freeship",
              "label": "Display Free shipping message?",
              "default": true,
              "info": "Manage from theme settings > General Settings > Free Shipping Message"
            },
            {
              "type": "checkbox",
              "id": "shippingTax",
              "label": "Display Shipping & Tax Message?",
      		"default": true
            }
          ]
        },
        {
          "type": "img",
          "name": "Secure and Payment Badge",
          "settings": [
            {
              "type": "image_picker",
              "id": "payment",
              "label": "Image"
            }
          ]
        },
        {
          "type": "@app"
        }
      ]
  }
{% endschema %}

Here is a copy of the file called “cart-drawer.liquid” :

{%- liquid
    assign giftpr = all_products[settings.gift_product]
    assign giftprc = giftpr.selected_or_first_available_variant.price | money
    assign giftId = giftpr.selected_or_first_available_variant.id
    assign isGift = true
-%}
{% capture cartDrawer %}

{% endcapture %}
{{ cartDrawer | strip_newlines | remove: "  " | remove: "	" }}

I remain at your service if you need anything else to help me.