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
- This topic has 5 replies, 2 voices, and was last updated 6 years, 10 months ago by Artem Temos.
-
AuthorPosts
-
January 14, 2018 at 11:24 am #33413
mikewordpressParticipantHi,
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!
January 14, 2018 at 1:37 pm #33426
Artem TemosKeymasterHello,
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
January 14, 2018 at 1:59 pm #33427
mikewordpressParticipantHello,
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?January 14, 2018 at 2:41 pm #33433
Artem TemosKeymasterWe 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.
January 14, 2018 at 2:48 pm #33434
mikewordpressParticipantI understood.
Would you mind masking that website link information for me?
Thank you very much!
January 14, 2018 at 3:03 pm #33438
Artem TemosKeymasterOK, we edited it.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register