<b>Hintergrund des Themas: </b>
I am trying to add products to the cart on my website, but sometimes the 2nd, 3rd, or 4th/5th products disappear. We have tested this extensively and cannot recreate the issue on our staging site. We noticed that changing the settings 'Synchronize cart content when switching languages' to 'Prompt for a confirmation and reset the cart' makes the cart work as expected in the default language German, but not in English or French.
When navigating in the EN or FR version, when clicking on the first or second link (going to a Product page, Cart page or any other page) we get the notification "Switching language? You have switched language..." with the buttons "Keep EN" or "Switch back to DE" -> when clicking on either button, the cart gets emptied. For example I add a product to the cart and click on the cart link, notification pops up and cart gets cleared. If i navigate instead of going to the cart to another product, same popup and cart gets cleared.
Example link to a page where the issue can be seen: hidden link
<b>Die Symptome: </b>
When settings are for both Language and Currency set to 'Synchronize cart content when switching languages', items disappear from the cart in all languages. When settings are set to 'Prompt for a confirmation and reset the cart', the German cart works, but the English and French carts do not work. Navigating in EN or FR triggers a notification 'Switching language? You have switched language...' with buttons 'Keep EN' or 'Switch back to DE', and clicking either button empties the cart. Adding a product and clicking on the cart link or another product triggers the same popup and clears the cart.
<b>Fragen: </b>
Why do items disappear from the cart when NOT switching languages?
How can I prevent the cart from being cleared when navigating in English or French without changing language?
Since yesterday, we have figured out that if we disable multicurrency, the cart works as expected. When we do have multicurrency activated, our developer noticed, that the wcml_client_currency_language cookie switches languages without manually changing locales...
Multicurrency is crucial for our shop and we need a solution as soon as possible. Please let us know how you can assist. If you provide a form, I can create a user for you to have access to WordPress.
Thanks for contacting WPML forums support. I'll be glad to help you today.
First of all, sorry for the late reply; it was due to a higher workload.
Please go to WooCommerce-> WooCommerce Multilingual-> Settings tab-> Cart section, select Synchronize cart content when switching languages in both options, then save.
Hi Osama
Thanks for your respond. Please note, that when we have the settings "Synchronize cart content when switching languages" for both options, items disappear from the cart. You can observe this issue on the live website lavie-home.ch.
We have narrowed down the issue for items disappearing from the cart to the currency switcher. When we disable the multi currency option in WordPress - Woocommerce - Multicurrency - Multicurrency tab - disabled, the cart works as normal. Once activated, items disappear.
Our developer found these issues:
- found inconsistent wp-wpml_current_language values
- site will at random times switch from German default language to /en/
Can you please help us with this issue as soon as possible! Our webshop is not working properly and it needs fixed urgently.
Thanks for your update. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please back up your database and website ❌
✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
Best regards,
Osama
The topic ‘[Closed] Issues with cart dropping products’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.