Skip Navigation

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

Problem:

Popup cart notification showing wrong currency

Solution:

- Add this code to your functions.php file.

/**
* Add this code to the functions.php file of your theme.
*/
add_filter( 'wcml_multi_currency_ajax_actions', 'xstore_add_action_to_multi_currency_ajax', 10, 1 );
  
function xstore_add_action_to_multi_currency_ajax( $ajax_actions ) {
  $ajax_actions[] = 'etheme_added_to_cart_popup'; 
  return $ajax_actions;
}

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.

Tagged: 

This topic contains 10 replies, has 2 voices.

Last updated by jakubZ-14 1 year, 3 months ago.

Assisted by: Dražen Duvnjak.

Author Posts
May 19, 2023 at 11:25 am #13678701

jakubZ-14

The problem is with a multilingual store. The base version is in Polish. When we enter the store in English and add a product to the cart a window pops up - unfortunately the price is shown in PLN. Also, this is how it shows at the shopping cart. Only when we go to the cart the price shows in euros.

May 19, 2023 at 11:45 am #13678913

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

please take your time and try to reproduce the issue on the test site.

Once you do, please share with me the steps you did, so I can confirm it also.

If you are not able, please let me know and we will share the next steps.

Regards,
Drazen

May 19, 2023 at 12:01 pm #13679035

jakubZ-14

Hi, we installed theme and added product. On the test page this issue didn't appear.

May 19, 2023 at 12:03 pm #13679041

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back and taking the time to reproduce.

I would need to check the issue on your website.

Please make a full backup of your site (files and database) and confirm it in your next reply.
If possible please provide access to the staging website, not production.

Please note, that I might need to do some debugging procedures like enable/disable plugins, switch themes, change the default language of the user account, and/or access your website database to debug the issue furtherly.

I will share with you any changes or steps done in this process. Please let me know if you do not agree with the above or if I do not have your permission for any.

I would need to access both your site's wp-admin and FTP account, if possible.

I have enabled the private username and password fields in your next reply.

I suggest you create a new user, set it as an administrator and then add those credentials in the private fields mentioned.

You can safely add your information into these fields.

Regards,
Drazen

May 19, 2023 at 1:30 pm #13679841

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

I have disabled all other not related plugins and updated plugins and themes to the latest versions, but the issue still happened.

Then I compared your steps to reproduce and saw they are not completely the same, so I checked and managed to reproduce the issue on that website I shared, or so it seems so.

I will try next to create a new fresh case for our compatibility team and escalate, but the only thing I am missing is how to enable the popup for products. Please share the steps.

Thanks,
Drazen

May 19, 2023 at 1:34 pm #13679901

jakubZ-14

Thank you for information. The popup will show as soon as you add the product to your cart.

Zrzut ekranu 2023-05-19 o 15.34.32.png
May 22, 2023 at 6:41 am #13686445

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks.

I managed to find the option in the theme options, Product notification that needs to be enabled and set to Popup.

I've escalated this ticket to our compatibility team.

They are taking a look at the issue and I will let you know as soon as they have updates.

Kind regards,
Drazen

May 23, 2023 at 6:48 am #13694787

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

our team checked and we are providing the next temporary workaround, that seems to fix the issue:

Workaround

- Add this code to your functions.php file.

/**
* Add this code to the functions.php file of your theme.
*/
add_filter( 'wcml_multi_currency_ajax_actions', 'xstore_add_action_to_multi_currency_ajax', 10, 1 );
 
function xstore_add_action_to_multi_currency_ajax( $ajax_actions ) {
  $ajax_actions[] = 'etheme_added_to_cart_popup'; 
  return $ajax_actions;
}

Let us know how it goes.

We will also contact the theme author to include a permanent fix for this.

Regards,
Drazen

May 24, 2023 at 1:51 pm #13708157

jakubZ-14

Hello,

We have followed the instructions, unfortunately it didn't help.

May 25, 2023 at 6:00 am #13712125

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

I have just checked on your dev site, and the workaround works just fine.

I am not sure if you are doing something wrong or not adding the code to the right place. It should be functions.php of the current theme you are using (child theme).

Video: hidden link

Regards,
Drazen

May 25, 2023 at 10:17 am #13715073

jakubZ-14

I check it now and can confirm that my issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.