Add parentage of discount in price details

Hi , can you pls let me know how to add parentage of discount in price details ex: 70%

Hi @khanumshaheena

Put below code where you want to display % off text

{% if product.compare_at_price_max > product.price %}
{{ product.compare_at_price_max | minus: product.price | times: 100.0 | divided_by: product.compare_at_price_max | money_without_currency | times: 100 | remove: '.0'}}% off
{% endif %}