Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are experiencing issues when changing the language on the cart and checkout pages with items configured as WooCommerce composite products and pre-orders. Specifically, error messages appear when changing item quantities or simply switching languages, preventing the purchase of items.
Solution:
We recommend enabling the 'Prompt for a confirmation and reset the cart' option in WooCommerce Multilingual. This setting helps manage the cart's contents when switching languages or currencies by providing a dialog box that allows users to either proceed and reset the cart or go back and keep the items. Additionally, consider using the 'Products before cart reset' widget, which displays a list of products removed after a language or currency change. For detailed guidance on configuring these settings, please visit the documentation.

If this solution does not resolve your issue or seems outdated, 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 the problem persists, please open a new support ticket.

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.

This topic contains 1 reply, has 2 voices.

Last updated by Itamar 2 years, 9 months ago.

Assisted by: Itamar.

Author Posts
August 20, 2022 at 11:54 am #11897259

andreasS-104

I am trying to:
Change language on cart and checkout page - with added item that is configured as Woocommerce-composite-products and Woocommerce-Pre-Orders item.

When added in German and then proceeded without changing item and subitem-amount it works fine to proceed to checkout. and also works to change German language to English.

Especially when we change item or subitem amount - and then change language - an Error message always pops up ("...itemname..." cannot be purchased. The chosen option "...optionname..." is not available. )

But also only changing language with the "Woocommerce composite-product & pre-order" item in cart - the issue on Checkout page appears sometimes. Not sure yet exactly what triggers it - since sometimes (rarely) it works fine.

Also when trying to proceed to Checkout page - there is following message: "..." cannot be purchased. The chosen "..." option is unavailable.
There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.

Thus making it impossible to purchase the item, without deleting, and then adding new with the exact amount.

We made sure all options items and subitems are available and configured the same. But problem still comes up.

Else WPML and translation in cart and checkout works great with composite products and pre-orders ... and this issue is the only one that occurred and stops us from going online.

Would be great if you could help us resolve this. We contacted Woocommerce already - but they said that this is very likely a WPML issue...

Link to a page where the issue can be seen:
hidden link (Site is still offline and in development=

I expected to see:

Translated items of the "composite-products & pre-orders" item in both languages, while being able to change item and subitem amount - without the Error message.

Instead, I got: Error Message and not being able to purchase item.

Bildschirmfoto 2022-08-20 um 13.08.35.png
Bildschirmfoto 2022-08-20 um 13.08.25.png
August 21, 2022 at 5:40 pm #11900717

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

It is known that when using such plugins that enable the purchasing of products with complex options switching the language can cause a problem on the cart page. For this, we added to WooCommerce Multilingual the option to Clear the cart contents when language or currency changes.

By default, the selected option is to synchronize cart content. But you should go to WooCommerce -> WooCommerce Multilingual -> Settings and enable the 'Prompt for a confirmation and reset the cart' option. This option displays a dialog box that provides an option to proceed and reset the cart or to go back and keep the items in the cart.

We are aware of the inconvenience that this may cause users. Therefore we also added a widget called Products before cart reset. The widget displays a list of products that were removed after switching language or currency.

Please read the guide on using this option at the following link.

https://wpml.org/documentation/related-projects/woocommerce-multilingual/clearing-cart-contents-when-language-or-currency-change/

Regards,
Itamar.