Skip Navigation

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 32 replies, has 3 voices.

Last updated by Carlos Rojas 1 year, 9 months ago.

Assisted by: Carlos Rojas.

Author Posts
September 6, 2023 at 12:39 pm #14352563

edmondU

i already updated it. You can proceed

September 7, 2023 at 7:56 am #14356625

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi there,

1.- I can't reproduce the issue related to the cart when switching languages. It works correctly on my side. If you want I can create a video for you showing that it works as expected.

2.- On the other hand, with the issue related to the Mini Cart: could you describe step by step how to set/activate this mini cart on the site?

September 7, 2023 at 8:46 am #14357161

edmondU

hidden link

1. this is the video of the checkout when i try to switch languages.

2.Actually, the mini-cart was included in the theme, thus i had not to install/set up anything.
I have done both translation in the string translation and the mini-cart translation in the saved templates, which in theory should display the correctly, but it isn't.

Please inform me if you require additional details for a clearer understanding.

September 7, 2023 at 9:02 am #14357459

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi there,

Please watch this screencast I created displaying what I see: hidden link

Regarding the MiniCart, I would recommend you contact the theme's authors and ask them if the strings in this cart are translatable.

September 7, 2023 at 9:54 am #14357987

edmondU

1. The issue happens when the composite products are in the cart apparently.

2. The theme's default language is English, so in order to translate the mini-carts content i managed to switch the languages' default. In the backend, the translations are done correctly, but they do not show in the front-end.

Please inform me if you require additional details for a clearer understanding.

cart_english.JPG
cart_italian.JPG
September 7, 2023 at 10:58 am #14358703

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

1.- Could you provide the URL of a composite product that we can use as a reference?

2.- I understand the problem with the MiniCart, however, it would be great if you could contact the theme's authors and ask them about these strings. That will give us more information to work with and help us to isolate the cause of the issue

September 7, 2023 at 12:29 pm #14359369

edmondU

1. The link of a composite product

hidden link

you can try it with this as a reference

September 7, 2023 at 12:53 pm #14359633

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Yes, I can now see the problem.

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/

September 7, 2023 at 1:02 pm #14359725

edmondU

I would like to maintain the products when switching languages, so that the user won't have to look for them again, so the default option to synchronize the cart is correct.
How can we proceed?

September 7, 2023 at 1:17 pm #14359831

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi there,

In this case, as the documentation and my message explain, it is not possible to do it with complex products such as composite ones. Also, the complexity of the theme and other plugins installed on the site can contribute to this behavior.

You can always double-check where the behavior is originated by following these steps:
- Create a full backup of the site or create a staging site with a copy of the live site
- Update any outdated plugins and themes
- Flush any cache memory that might exist
- Deactivate all plugins, including the WPML ones
- Activate a default WordPress theme, like Twenty Twenty
- Activate the WPML plugins, Woocommerce, Woocommerce Multilingual and WPC Composite Products for WooCommerce
- Make sure all the composite products are translated
- Check if the issue disappeared. If the issue disappears you can start by activating the theme and then the rest of the plugins, one by one, until the issue appears again and you find the culprit.

If the issue persists, then our recommendation is to activate the option to clear the cart if the user switches languages

September 7, 2023 at 1:40 pm #14360007

edmondU

so when i try to add the following step after doing the cart reset when the language is switched: Showing the list of items cleared from the cart

these are the widgets available...

widgets.JPG
September 7, 2023 at 2:06 pm #14360515

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

I'm sorry, I don't understand your message. Could you elaborate a little more so I can have a better understanding?

September 8, 2023 at 8:07 am #14364433

edmondU

Following the link you shared in our previous conversation, I successfully managed to implement the step of resetting the cart when switching languages. However, I'm currently facing difficulty with the next phase - showing the list of items that were cleared from the cart. The photo I provided previously showcases all my available widgets.

Could you please guide me on how to proceed in order to align with the instructions provided in your link? Your assistance in navigating this step would be greatly appreciated.

Thank you for your patience and continued support.

Warm regards

September 8, 2023 at 8:20 am #14364487

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

The screenshot you shared shows the widget areas. You need to add the widget in the desired area to display the products that were removed from the cart. In this link you will find the official guide from WordPress to manage the widgets on your site: https://wordpress.org/documentation/article/manage-wordpress-widgets/

September 8, 2023 at 12:47 pm #14366691

edmondU

I've been trying to register a widget as outlined in a specific link, but have encountered some challenges in successfully completing the procedure.

While I have followed the instructions meticulously, I seem to be missing something or perhaps encountering an issue that isn't outlined in the guide.

I would deeply appreciate it if you could review the procedure from the link provided and guide me on the correct steps to register the widget seamlessly. Your expertise on this matter would be of great assistance to me.

Thank you very much for your time and support. I look forward to your response and hope for a swift resolution.

Warm regards