Why discount is not showing on the cart page?

Why discount is not showing on the cart page?

Sometimes the script that added at the time of installation, may not properly be added. Mostly due to the third party theme or changes in cart page structure.

How to fix it properly?

  • First thing you can do is contact our customer care via in-app chat or email.
    • Our developers will fix this for you within minutes if you contact within our office time (7AM - 11PM IST)

How to fix it yourself?

  • If you have got a developer on board or if you know how to edit cart liquid files, you can do it by yourself.
 
STOP!! DON'T DO IT WITHOUT PROPER KNOWLEDGE!! IT WILL MESS UP YOUR THEME!
 
Prerequisite
The following part of the article requires development knowledge. 

Don't do it without proper knowledge.
Prerequisite The following part of the article requires development knowledge. Don't do it without proper knowledge.
 
  • Go to Shopify admin > Online Store > Themes > Actions > Edit Code
  • Navigate to cart.liquid or included other liquid file inside cart.liquid
 

1. Single Product (Total Price) Wrapping

Search for any of the following code inside liquid file
  • Item.final_line_price
  • Item.original_price
  • Item.final_price
  • item.line_price
  • item.price
Wrap the code with <span class='ufe-cart-item-total-price' data-key='{{item.key}}' data-props='{{item.properties | json}}'>
 
Example:
<span class='ufe-cart-item-total-price' data-key='{{item.key}}' data-props='{{item.properties | json}}'> <span class="money" > {{ item.price | money }} </span> </span>
⚠️
If you didn't find item.price then check for line_item.price, some themes use different words for that. So we need to change item to line_item in the ufe code too like this <span class='ufe-cart-item-total-price' data-key='{{line_item.key}}' data-props='{{line_item.properties | json}}'>
⚠️
If <span class="money"> wrapped before the target then wrap the entire <span class="money"> with the ufe div, otherwise just wrap the {{ item.price | money }} only.

Single Product (Unit Price) Wrapping

if your store doesn't have a single product total but only the price of a single unit is on the cart page then,
Wrap the single item price with
<span class='ufe-cart-item-original-price' data-key='{{item.key}}' data-props='{{item.properties | json}}'>
if your store doesn't have a single product total. add the ufe code adjacent to single item price without wrapping anything.
like this
<span class='ufe-cart-item-original-price' data-key='{{item.key}}' data-props='{{item.properties | json}}'> {{ item.price | money }} </span>
 

2. Total cart price

Search for cart.total_price and wrap it with <span class="ufe-cart-total-price">
<span class="ufe-cart-total-price"> <span class="money">{{ cart.total_price | money }}</span> </span>
 
Save the liquid file ✨
 
You may find the following articles helpful 🙂.
 
Does UFE work with Sticky cart, cart drawer?
Does UFE work with Sticky cart, cart drawer?
Why redirecting to cart after clicking add to cart button?
Why redirecting to cart after clicking add to cart button?
 
Hope you've got some value from this article. Let us know your feedback 🙂 We are excited to hear your thoughts.
 
Did we miss something?
No worries! Message us by clicking the chat icon 💬  inside the app.
Or Just email our team at support@helixo.co ✌️
Did we miss something? No worries! Message us by clicking the chat icon 💬 inside the app. Or Just email our team at [email protected] ✌️