dynamic discount and currency switcher
-
I am using YiTH bulk discount Premium… and this problem is only with the secondary currency USD and the products where bulk discount is applied.
It seems that the plugin is converting the currency twice. I have used the following suggested code in one of your forum thread, it didn’t work…
——————————————————————————–
add_action(‘woocommerce_before_calculate_totals’, ‘fix_currency_conversion’);
function fix_currency_conversion($cart_object){
global $WOOCS;
$cur_currency = $WOOCS->current_currency;
$currencies = $WOOCS->get_currencies();
$conversion_rate = $currencies[$WOOCS->current_currency][‘rate’];
if($cur_currency == ‘USD’){
foreach ( $cart_object->cart_contents as $cart_item_key => $cart_item ) {
$cart_item[‘data’]->price = $cart_item[‘data’]->price / $conversion_rate;
}
}
}
——————————————————————————–Please help me resolve this issue…
You can change the currency here
https://www.bullionmart.ca/try/and use the product
https://www.bullionmart.ca/product/2020-south-africa-1-oz-silver-krugerrand-bu/The discount table below add to cart button is from dynamic discount plugin.
An early reply is highly appreciated…
- The topic ‘dynamic discount and currency switcher’ is closed to new replies.