How to add a percentage discount on products in Dawn 5.0?

Hi Experts

How would I add the percentage in as per the below image.

I’m using Dawn 5.0

Thank you

Hello @BrandonD

I would like to give you some recommendations to support you
You can add code like this

{%  if card_product.compare_at_price > card_product.price and card_product.available  %}
           
           
                
                  {% assign diff = card_product.compare_at_price | minus: card_product.price %}
                  {% assign comparePriceFloat = card_product.compare_at_price | times: 1.0 %}
                  {% assign diff = diff | divided_by: comparePriceFloat %}
                  {% assign diff = diff | times: 100.0 %}
                  {% assign diff = diff | round %}         
                  
                    {{ diff }}%
                  
                
                
              
           

          {%  endif %}

Result on my store

Hope my recommendation can works and support for you!
Kind & Best regards!
GemPages

Have you tried compare to price in the products menu?