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 thread is resolved. Here is a description of the problem and solution.

Problem: Switching a language makes the products in your basket disappear.

Solution: Went to WooCommerce -> WooCommerce Multilingual -> Settings-> Cart and enabled the "Prompt for confirmation and reset the cart" option to show the widget

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

This topic contains 7 replies, has 2 voices.

Last updated by hlaingM 4 months ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
July 15, 2019 at 3:57 am #4206885

hlaingM

This issue is related to our discussion regarding the purchase of the woocommerce product. You mentioned that WPML is compatible with woocommerce.

hidden link
hidden link

At those links, you can purchase a product and add the desired quantity of the products to the basket located at the top-left headbar. After you finished adding your product to the basket, you want to browse for more products or you want to switch a language.

The issue is that switching a language makes the products in your basket disappear. You can test that issue at the links provided.

You can test it by registering yourself to open an account (or) I can give you an account's credentials to test that issue.

In default, the cart will be reset when you switch a language or currency, but you can use the settings as mentioned in the following documentation and set it different.

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

Thank you for the info. I looked into the instructions. My original/default setting was at " Synchronize cart content when switching languages". It implies that the cart will keep the same products when the language is switched. However, it is not the case with my site when the language is switched. I also tried the other option. None of them works. The cart gets emptied every time the language is switched.

Another issue is that according to the link, I can insert the “Products before cart reset” widget at appearance>widgets>

But, I am NOT able to find that specific widget.

Awaiting your response.

July 15, 2019 at 3:59 am #4206889

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

The login details you provided is not working, so can you please check and provide the login details again?

I have enabled the private reply.

Thanks

July 15, 2019 at 5:15 am #4207103

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,


Another issue is that according to the link, I can insert the “Products before cart reset” widget at appearance>widgets>

Once you go to WooCommerce -> WooCommerce Multilingual -> Settings-> Cart and enable "Prompt for confirmation and reset the cart" the widget is appearing in the widgets section.

Checking on this product, I noticed that this product is not purchasable from the English language, can you check with products that can be added to cart from both languages and let me know if the feature works perfectly.

Look forward to your reply.

Thanks

July 15, 2019 at 5:38 am #4207255

hlaingM

Hi,

(1) I am still not able to find the widget "Products before cart reset."
"https://wpml.org/documentation/related-projects/woocommerce-multilingual/clearing-cart-contents-when-language-or-currency-change/

(2) None of these products is yet available in both languages. When you said that, were you meaning to say that if the products are available in both languages, the products in the cart will not get emptied when I switch the language?

Thanks.

July 15, 2019 at 5:44 am #4207289

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I enabled the option as mentioned in my previous reply and the widget is appearing in Appearance->Widget, please confirm.

Were you meaning to say that if the products are available in both languages, the products in the cart will not get emptied when I switch the language?

Yes, if the product is not available in that language, then it doesn't make sense to add that product to cart in that languages and this is normal, so just make the product available to purchase from that language and see if this helps?

Look forward to your reply.

Thanks

July 15, 2019 at 7:53 am #4208063

hlaingM

Hi,

Thank you. I just found the widget. How did you enable the option for the widget?

Thanks

July 15, 2019 at 9:09 am #4208775

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

As I already mentioned I went to WooCommerce -> WooCommerce Multilingual -> Settings-> Cart and enabled the "Prompt for confirmation and reset the cart" option to show the widget

Thanks

July 17, 2019 at 5:59 am #4226011

hlaingM

My issue is resolved now. Thank you!