[Resolved] Sale badge not showing correct percentage
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was facing an issue where the sale percentage displayed on the product pages was not updating correctly across all translated versions of their website. The main site showed a 7% discount correctly, but the translated versions continued to display a 20% discount, despite the client having updated the sale percentage. Solution: We identified that the issue was related to how the theme was handling the sale badge, which was automatically generated when a sale price was entered. The client resolved the issue by navigating to WooCommerce > Appearance > Product Page and selecting the option to not display the percentage in the sale badge. This change resulted in the badge displaying only the word 'SALE' across all versions of the site, thus maintaining consistency and avoiding incorrect discount displays. If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we recommend opening a new support ticket. Additionally, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
I am trying to update the sale percentage from 20% to 7% for a product on my site hidden link. The product in question is hidden link.
Symptoms:
The translated versions of the product are still showing a discount of 20% instead of the updated 7%. The affected URLs are: hidden link, hidden link, hidden link. However, the French version shows the correct percentage: hidden link.
Questions:
Why are the translated versions of the product not reflecting the updated sale percentage?
How can I ensure all translated versions show the correct sale percentage?
When I checked the URLs you gave as an example, the price was 149.50. Please see the attached screenshot. It is the same price as the original Dutch product and also the same as the French product, where you said that the problem does not occur.
It might have been that the translations of this product were not updated.
What feature is adding this badge?
Is it a plugin or coming from your theme?
Please ensure that the translations of the products where the problem shows are updated. You need to see the pencil icon next to the other languages.
If it does not work, please give me access to your site to check this issue.
If you need further help with this, please share the access details to your site with me. I'm enabling a private message for the following reply. Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ **IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--
Hi there,
My name is Carlos and I will continue working on this ticket while my colleague Itamar is on vacation.
I've visited the site and I can see that the translations of the product you mentioned as an example (hidden link) need to be updated. Please update all the translations for this product and double-check if the issue disappeared.
Thanks for checking.
Sometimes translations disappear. They don't disappear on the front-end, only the back-end. I think it is after clearing cashing or updating a plugin, I have no idea.
Anyway, I updated the translation for Austria and Germany and cleared the cache via WP Rocket. And still the badge shows 20% unfortunately.
As you can see in the links you shared, the price is correct in both cases, which means that the badge calculation is incorrect, but as you mentioned already this feature comes from the theme, which means that the code with the issue doesn't come from WPML or Woocommerce Multilingual & Multicurrency plugin.
If you could contact the authors of the theme and ask them to check this or ask them where the code from this badge comes from I can escalate this ticket to our 2nd tier of support so our 2nd tier specialists can help the authors to find a solution 🙂
Unfortunately I can't contact the author of the Flatsome theme.
I have found another solution however.
On the page woocommerce > appearance > product page you can choose whether or not you would like the % to be shown. I choosed for 'not' and now in the bubble the text is only the word 'SALE' in all countries. So that is perfect.
If you can contact the Flatsome authors in the future and still need our help, please don't hesitate to contact us. We will be more than happy to assist you.