Home › Forums › WoodMart support forum › WPML Multi Currency: Rounding Variable Products & Currency Symbols on AJAX Tabs
WPML Multi Currency: Rounding Variable Products & Currency Symbols on AJAX Tabs
- This topic has 2 replies, 2 voices, and was last updated 3 years, 11 months ago by Elise Noromit.
-
AuthorPosts
-
December 18, 2020 at 7:50 am #252009
ballgagbearParticipantHi there,
I’m really enjoying building my new site with the Woodmart theme. Honestly, great work on everything – it looks great. That said, I’m having two problems after adding multi currency using WPML (as recommended on this forum). The attached screenshot illustrates both problems.
1) I run my store in Canadian dollars, but most of my customers are from the US shopping in US dollars. I’ve always stated my prices in round dollar amounts in $CAD, and I am trying to show $USD amounts rounded to the nearest dollar. Woodmart product grids correctly show the rounded amounts for simple products, however, variable products are shown in product grids with the exact unrounded amount in USD. That said, if you add a variable product to the cart, the price changes to the correct rounded amount in the cart. To make matters stranger, product pages show the unrounded price after selecting an option if there is only one attribute used for variations, but variable products with two attributes used for variations show the correct rounded price after you select both options. I’ve circled unrounded prices in red in the attached screenshot. Is there a way to correctly apply the rounding rule for all of the places where the price of variable products appears on product grids and product pages?
2) I used a code snippet that was originally recommended on this forum to help another person use different currency symbols for Swedish and Norwegian Kroner. In my case, I needed to distinguish between $CAD and $USD. I used the following snippet to change the American “$” to “USD $”, and the Canadian “$” to “CAD $”. However, when I switch to a different tab on the AJAX Products Tabs, all prices revert back to using the default “$” for both currencies. The attached screenshot is taken of the second tab on my AJAX Product Tabs. The first tab correctly displayed all prices in the format “USD $X.00”. Is there a way to have this change apply to the AJAX Product Tabs?
// Change the currency symbol for Canadian and US Dollars function sww_change_wc_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'USD': $currency_symbol = 'USD $'; break; case 'CAD': $currency_symbol = 'CAD $'; break; } return $currency_symbol; } add_filter('woocommerce_currency_symbol', 'sww_change_wc_currency_symbol', 10, 2);
That all said, I’m generally very happy with my experience so far. This is just a really important feature for my website, so I’m eager to get it fixed!
Thanks,
GregDecember 18, 2020 at 7:54 am #252011
ballgagbearParticipantI’m just attaching a compressed version of the screenshot. The original upload exceeded the attachment file size limit.
Attachments:
You must be logged in to view attached files.December 19, 2020 at 12:50 pm #252357
Elise NoromitMemberHello,
1. Please make the full backup of your site as well as the Theme settings export and check the issue on the Storefront theme to detect if our theme causes the problem. Storefront is a free theme developed by Woocommerce.
2. We have tested the code on the AJAX tabs and it works correctly.
Best Regards
-
AuthorPosts
Tagged: AJAX-Product-Tabs, multi currency, rounding, variable products, Wpml
- You must be logged in to create new topics. Login / Register