Background of the issue:
I am trying to switch the language on the homepage of my site, which is mainly in Czech: hidden link. The site does not switch to the Czech language properly, causing issues with adding items to the cart. The cart keeps deleting items or only shows one item from the Slovak version. It works when I add this URL: hidden link, but this is not directly possible on the homepage due to other configurations. I want WPML to properly switch the language.
Symptoms:
Language switch not working on the homepage, causing cart issues.
Questions:
How can I make WPML properly switch the language on the homepage?
Why does the cart keep deleting items or only show one item from the Slovak version?
I tried to observe the issue in your site but I see multiple language switchers in the site footer with different languages, pointing to different domains (see attached langs.jpg).
Can you please explain the issue in more detail? A screen-recording showing what's exactly happening 'll be helpful in understanding the issue.
For the other issue about cart deleting the items, I tried this in default CZ language as you mentioned it is the main language, although I see SK is the default language of the site. However, in CZ adding items doesn't delete it (see the cart.jpg attached here).
Anyways for the second issue (cart deleting items), I recommend opening a separate ticket/chat because as per forum policy we can only handle one issue per ticket/chat. So you can get more to the point help, without mixing up several issues in one long ticket.
Please let me know about the first issue (switching languages) and I'll try my best to help you further on the matter.
there is only one issue of products deleting while switching language and trying add to cart. language switch happens when i click at footer language switcher but when second langugage version is loaded which is staging.nutrifoodketo.cz,, i have a made a short video on this please check: hidden link
Usually that shouldn't happen, but looks like either there's kind of cache which is interfering with old content or a conflict which causing the update process to break.
I suspect it is either your theme (CiyaShop) which isn't on our compatibility list or a 3rd party plugin (separate or theme accompanying) which may throw some conflicts or compatibility issues.
To understand that if problem is really coming from WPML/WCML or from another place, please try the following and let me know your findings?
1) Take a full backup of your site and database before proceeding. It is highly advised to try these on a dev or staging site first, so your live site isn't compromised.
2) Deactivate all plugins except WPML, String Translation, WCML and WooCommerce.
3) Switch to a standard theme like 2024 or 2021.
4) Check for the issue if it still happens.
5) Then start activating plugins one by one while keep checking for the issue. This way you 'll be able to pinpoint a conflict when & where it starts creating the problem.
6) If after activating all plugins you see that it still works fine, then switch to your theme and see if that's causing it.
Additionally, you can find some Cart related settings in WooCommerce -> WCML -> Settings -> Cart section (see attached) which take place when switching a language or currency in the frontend.
The topic ‘[Closed] language switch not working on homepage of translated site’ is closed to new replies.