Home Forums WoodMart support forum AJAX Cart Shows Wrong Currency with WPML Only on Single Product

AJAX Cart Shows Wrong Currency with WPML Only on Single Product

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33413

    mikewordpress
    Participant

    Hi,

    I’m using WPML currently. When I click add to cart button on catalog page, the correct currency for the product is shown in the AJAX cart but when I click add to cart button on single product page, the default USD currency is shown in the AJAX cart instead of the currency on the single product page

    The difference I noticed is on catalog page, the add to cart button has this link
    https://www.mysite.com/?add-to-cart=155889
    But on single product page, no link is shown when I hover on the add to cart button.

    So maybe these buttons work differently?

    I found that I need to set this option on WPML “Store a language cookie to support language filtering for AJAX” to make it work but there are still problems.

    For add to cart on catalog page, I don’t even need to set “Store a language cookie to support language filtering for AJAX” option on WPML but it works correctly.

    For add to cart on single product page, it only works when I set that option and it has some delay for the price in cart to change from USD to correct currency so users will obviously see the USD first. Also, add to cart on single product page will not work on Incognito browser mode at all.

    Could you advise why this is happening?

    Thank you!

    #33426

    Artem Temos
    Keymaster

    Hello,

    Yes, as we can see it works differently on the single product page, and yes, these mechanisms a bit different. But we don’t know why it firstly shows USD and not the current currency. By default, WooCommerce doesn’t have an AJAX adding to cart function for the single product page and that is why WPML may work wrong. You can disable this custom option in Theme Settings -> Product page since we are not able to change anything in this situation. You can try to contact WPML with this issue also. If there are some requirements from their side, we will help you to implement them.

    Regards

    #33427

    mikewordpress
    Participant

    Hello,

    Thanks for your quick reply.
    So for theme’s side it’s difficult to make the Single product page work like catalog page add to cart button right?

    #33433

    Artem Temos
    Keymaster

    We can’t do it the same as on the catalog page. It has a simple link there and on the single product page it has an HTML form with some extra data like quantity and other.

    #33434

    mikewordpress
    Participant

    I understood.

    Would you mind masking that website link information for me?

    Thank you very much!

    #33438

    Artem Temos
    Keymaster

    OK, we edited it.

Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)