This topic has 9 replies, 3 voices, and was last updated 2 years, 9 months ago ago by Cor
Hi,
please, I added the following code in the functions.php page to be able to add the discount percentage next to the price on the product page.
In other XStore themes (https://prnt.sc/26nie82) with the same php configurations, the code works perfectly but on this theme I get error warnings (https://prnt.sc/26nif92).
Thanks
Hello,
Read this post and try to improve your code https://wpsimplehacks.com/how-to-display-the-discount-percentage-on-the-sale-badge/
Additional customization is outside the scope of our support https://themeforest.net/page/item_support_policy
Regards
Hi, thanks for your reply.
I have tried other solutions but I think there is something in your theme that is preventing it from publishing correctly. This is because the same code applied on your other older themes responds well.
Hello,
Does code work ok if you try it with the default Storefront theme?
Regards
Hi,
it works https://prnt.sc/26oq6ik
Only when I activate the Builder (https://prnt.sc/26oq8ds) is it not visible…
Can you help me? Please, thank you.
Hello,
Provide URL of product and FTP access, we will check what can be done to help you.
Regards
Hi, thanks.
Access In private content.
Regards
Hello,
Use etheme_woocommerce_template_single_price theme builder hook instead of woocommerce_single_product_summary.
Check now.
Regards
Hi, thank you very much
Tagged: discount, error, percentage, template, woocommerce, wordpress
The issue related to '‘Error adding php to display discount percentage on product page’' has been successfully resolved, and the topic is now closed for further responses