How can I display discounted prices in the cart?

Hello there,

I am here again!

I insert this code to have a discount on my collection’s page:

{% if liquidObject.vendor == "Brand Name" %}
              {% assign discount_percentage = 0.6 %}
            {% assign discounted_price = liquidObject.price | times: discount_percentage%}
               {{ liquidObject.price | money 
              {{ discounted_price | money }
            {% endif %}

and this code to have discounted prices on all product page:


{% if product.vendor == "Brand Name" %}
    {% assign discount_percentage = 0.65 %}
    {% assign discounted_price = product.price | times: discount_percentage %}
    {{ discounted_price | money }}
  {% endif %}
  {{ product.price | money }}

They work well but if I try to add them to cart, in the cart I see the original price.
How can I make to see the discounted price in the cart. It’s clear, I need that the user pays the discount price amount. :slightly_smiling_face:

I attach a picture to help you to understand me better. If you check, if you can see the price on the cart side is the same of orignal price (€234.43), it’s wrong! I need to see the discount price (€152.38).

Can you help me, please??

Thank you so much

Hi,
I think what you did is only change the ‘look’ on frontend. It will not affect the price of product that related with the purchase order process.
You can try the Sale price setting which is default feature of Shopify here: https://help.shopify.com/en/manual/discounts/sales

If you want something dynamic, you should find some app that can do it or use Automatic discounts
https://help.shopify.com/en/manual/discounts/discount-types

1 Like