Sauter la navigation

Ce sujet est résolu. Voici une description du problème et de la solution.

Problem:
If you're experiencing issues with incorrect item numbers displaying in the Brand filter across multiple languages, it might be due to the translation settings of your 'Product Brand' post type. For instance, if the Brand filter shows 45 products for a brand that only has 9, this could be because the product count is being multiplied by the number of languages.
Solution:
We recommend checking the translation preference for the 'Product Brand (product_brand)' post type within your WPML settings. Navigate to WPML > Settings and in the 'Post Type Translation' section, change the translation preference for 'Product Brand' to 'Translatable - only show translated items'. After making this change, retranslate the product. This should ensure that the Brand count reflects the correct number of products assigned to the brand in the active language.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, 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. If further assistance is needed, please open a new support ticket at WPML support forum.

Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.

Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum French. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Prosenjit Barman Il y a 1 mois et 2 semaines.

Assisté par: Prosenjit Barman.

Auteur Articles
août 17, 2024 à 7:26 am #16079689

arnaudt-15

Contexte de la question:
I'm having a problem displaying item number in Brand filters (releated with translation).. I am using the Elessi theme documentation.

Symptômes:
In all languages (x5) including the original language (French), the Brand filter displays an incorrect item number for two brands (Tritemps and Yamagiwa). For example, for the TRITEMPS brand, the tab specifies that there are 45 products available, but in reality there are only 9. This means that the available product number displayed corresponds to: 9 products (product actually available) multiplied by 5 languages equals 45 products (error).

Questions:
How can I correct the item number displayed in the Brand filter for different languages?
Is there a specific setting in WPML that affects the product count in filters?

août 19, 2024 à 7:28 am #16082244

Prosenjit Barman
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

To reduce the waiting time, I took this ticket and responded in English. Please let me know if you're okay with it or if you want to continue the conversation in French language. I will check and forward this ticket to one of our French-speaking supporters to assist you in the French language.

I understand the issue you're facing. I checked the Brands, and it appears they've been created within a post type called "Product Brand (product_brand)." The translation preference for this post type is currently set to "Not Translatable."

As a result, when you add Brands to the default product and then translate the product, the same Brand is assigned to the translated product. This causes the count for that Brand to reflect the total number of products it's assigned to, including the translated versions.

To resolve this, please navigate to "WPML > Settings" and, in the "Post Type Translation" section, change the translation preference for the "Product Brand (product_brand)" post type to "Translatable - only show translated items." After making this change, retranslate the product. The Brand count should then reflect the number of products the brand is assigned to in the active language, rather than across all languages.

Please let me know the update. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

août 19, 2024 à 8:08 am #16082350

arnaudt-15

Hello Prosenjit,

Perfect, thank you for contacting me in English. It's not a problem at all, and what's more, you helped me solve my problem, so double thanks to you!
The problem was that the translation option wasn't checked. I didn't have to translate the products again. The item number for each “brand” category was updated automatically.

arnaudt-15 a confirmé que le problème avait été résolu sur 2024-08-19 08:08:22.
Ce ticket est maintenant fermé. Si vous êtes un client de WPML et que vous avez besoin d'aide, veuillez ouvrir un nouveau ticket d'assistance