[Geschlossen] Get Language from User Language on Register
Dies ist das technische Support-Forum für WPML – das mehrsprachige WordPress-Plugin.
Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team antwortet im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.
I recently purchased and installed the WPML plugin for my system. However, I've encountered several issues that I need help with.
Firstly, one problem arises from Germany and Switzerland sharing the same language, which prevents me from displaying three distinct prices to customers based on their location. My system operates in a way where, for instance, a product has three different prices for different countries - £50 for the UK, €40 for Germany, and CHF 80 for Switzerland.
When customers register, I use the Wholesale World Commerce plugin to create three different roles for them and set three different prices accordingly. Customers from Switzerland can see their price and currency rate when they make a purchase, similar to how a customer in the UK would enter their price and see the cost in their system's registered language, along with their individual price, and make a purchase accordingly. Everything, including invoices and orders, should automatically reflect the appropriate currency rate for the customer. However, I am facing certain issues with this setup.
The system works fine for German and English as they are different languages, but Switzerland uses German as well, and I am unable to separate the prices based on language alone for Switzerland. Therefore, I am seeking your assistance.
My issue specifically occurs when registering a customer in the fullsale role and trying to display the sale prices according to the language I have assigned to that customer. There is no issue displaying prices for a group, but when it comes to currency rates, for example, Swiss customers are shown prices in pounds, similar to British customers, which is incorrect.
How can I resolve this problem?
Thank you for your assistance.
Best regards,
Berkay
---
Feel free to adjust any details to better fit your situation before sending it out.
Folgen Sie einer Dokumentation?
Gibt es ein ähnliches Beispiel, das wir sehen können?
You could give them a try, and see if they solve one of your problems 🙂
--------------
German and Swiss ("ch") appear as 2 different languages so even if they have the same content, they should be treated separately.
If you want to display certain currencies by countries, you can use our multicurrency feature and set the default one for each language (WooCommerce > WooCommerce Multilingual > Multicurrency).
Even if they are duplicated, they should display the different currency, but I'm not sure about the rest (invoices, etc.)
In the title of this ticket you write that you want to get the language from the user language, and if by "user language" you mean the language the user has in the back-end you can either set it manually (Since by default the user language will not be set based on where they are from or in which language they buy) or use a snippet like this one to set the language of each new user as the one they use on the front-end at the time of purchase:
versteckter Link
------------------------------
PLEASE NOTE:
This snippet might need to be adapted to your site and it's not supported by us. it's sole purpose is to point you in the right direction. you can also ask one of WPML Certified contractors for more help if needed: https://wpml.org/contractors/
Das Thema '[Geschlossen] Get Language from User Language on Register' ist für neue Antworten geschlossen.