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 5 replies, has 2 voices.

Last updated by Raja Mohammed 6 months ago.

Assigned support staff: Raja Mohammed.

Author Posts
April 7, 2019 at 8:16 pm #3552955

andreaT-28

I am trying to: add items to cart using my second language

Link to a page where the issue can be seen:

I expected to see: items added to cart and stay in cart.

Instead, I got: the item gets added but then if I keep shopping/navigate, the cart resets.

I've tried several things and I finally found that If I check "Prompt for a confirmation and reset the cart" in Woocommerce > Woocommerce multilingual > Settings > Cart, the issue disappears.
It's like WPML tries to syncronize the cart, doesn't find the "linked" product from italian to english and so resets the cart. Indeed the products are not linked because I had a plugin conflict and I need to keep them unlinked.

The thing is, I don't like the pop-up notification. I just want that WPML stops trying to syncronize the cart.

April 8, 2019 at 4:20 am #3554089

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there.

Welcome to our forum,

Have you tried enabling cart synchronization setting " Synchronize cart content when switching languages" from Woocommerce > Woocommerce multilingual > Settings > Cart?.
This would solve your issue.

Please note in order to cart synchronization to work properly the Ajax cookies should be enabled from WPML > Language > Language filtering for AJAX operations

Let me know the results.

Kind regards
Raja

April 8, 2019 at 10:19 am #3556491

andreaT-28

Hello, the problem appear when I enable the settings you suggested, my cart is always resetted in the second language. So this is not the solution, this is actually causing the problem.

I have ajax cookies enabled and also excluded in WP Rocket cached cookies.

April 8, 2019 at 12:45 pm #3557721

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

That's strange behavior.

Please share temporary access to your site, I have enabled private reply for you to securely share the details. You can use the Duplicator plugin to create a snapshot of the site and share the package link with me http://wordpress.org/plugins/duplicator/

I will be awaiting your response.

Kind regards
Raja

April 18, 2019 at 4:35 pm #3640815

andreaT-28

Hi, just to let you know, I had to revert the WPML update (luckly I had previous versions files in my hard disk). Now the pop-up won't show randomly, but the issue is still present when I deactivate the Pop-up notice and just select "sync cart products," in the settings. In fact, when you add one product and then keep shopping and navigate the site, the cart gets reset (in the second language)

April 19, 2019 at 9:10 am #3644347

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

I have checked your site. I have noticed that English and Italian translation of products are not connected they are created as separate products which is why you are encountering issues with the cart.

I have checked all the products none of them has translation connected. Please follow the steps .

=> Edit the product, in Languages Section click on "Connect with translations" link, It will open a popup when you can enter the appropriate translation of the product.

Once the translation is connected, Check if the issue still persists.
You can try this with a single product and apply the steps to all other products.

Please, let me know the results.

Kind regards
Raja

The topic ‘[Closed] Cart Issue when using 2nd language’ is closed to new replies.