I want to display discount in percentage format on product list and product view page as like below
30% Discount
How I can achieve this task in proper Magento-2 way.
Code should be define in any one place and use it in anywhere.
thanks in advance.
Best Answer
Try this in
design/frontend/Vendor_Name/Theme_Name/Magento_Catalog/templates/product/list.phtml
The same way you can do it from product page.