Default Multi Currency Value Problem
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from The on January 16, 2024, 15:03Our website is: https://materiauxdeconstructionturquie.com/
Hello, we use the b2bking plugin on our website. We show b2b prices for those who are logged in to the site, and b2c prices for those who are not logged in. When using the b2bking plugin, users who were not logged in were seeing CFA. Logged in b2b users were seeing euros. We were setting different price values for both from the b2bking plugin.
We bought the fox currency switcher add-on because we had a problem with the price filter. Currently, the settings we made via b2bking are not working. Can we make logged in users see cfa by default and logged in users see euro by default?
note: b2b and b2c prices are separate prices. They are not converted versions of each other into CFA or Euro.
Additionally, we do not want pennies to be displayed in CFA prices. How can we achieve this? Thanks.
Our website is: https://materiauxdeconstructionturquie.com/
Hello, we use the b2bking plugin on our website. We show b2b prices for those who are logged in to the site, and b2c prices for those who are not logged in. When using the b2bking plugin, users who were not logged in were seeing CFA. Logged in b2b users were seeing euros. We were setting different price values for both from the b2bking plugin.
We bought the fox currency switcher add-on because we had a problem with the price filter. Currently, the settings we made via b2bking are not working. Can we make logged in users see cfa by default and logged in users see euro by default?
note: b2b and b2c prices are separate prices. They are not converted versions of each other into CFA or Euro.
Additionally, we do not want pennies to be displayed in CFA prices. How can we achieve this? Thanks.
Quote from Pablo Borysenco on January 17, 2024, 11:58Hello
Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png
You can use this function - https://currency-switcher.com/function/woocs-set_currency
an example:
add_filter('wp_head',function(){ global $WOOCS; if(is_user_logged_in()){ $WOOCS->set_currency('EUR'); }else{ $WOOCS->set_currency('CFA'); } }); we do not want pennies to be displayed in CFA prices. - options - https://share.pluginus.net/image/i20240117115800.png
Hello
Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png
You can use this function - https://currency-switcher.com/function/woocs-set_currency
an example:
add_filter('wp_head',function(){
global $WOOCS;
if(is_user_logged_in()){
$WOOCS->set_currency('EUR');
}else{
$WOOCS->set_currency('CFA');
}
});
we do not want pennies to be displayed in CFA prices. - options - https://share.pluginus.net/image/i20240117115800.pngQuote from The on January 17, 2024, 15:58I tried the code you said and it didn't work. I have no coding knowledge. We must display prices according to the user groups created by the B2B King pro application. B2B users should see euro and b2c users should see cfa prices. Your plugin disables b2bking pro settings. Can you help me? I can provide login information for you.
I tried the code you said and it didn't work. I have no coding knowledge. We must display prices according to the user groups created by the B2B King pro application. B2B users should see euro and b2c users should see cfa prices. Your plugin disables b2bking pro settings. Can you help me? I can provide login information for you.
Quote from Pablo Borysenco on January 18, 2024, 11:14Hello
If you have no programming experience, you should hire a developer
Unfortunately, code customization is not included in support.
We must display prices according to the user groups created by the B2B King pro application - in this case you should replace this condition with checking the user's role
AN example:
add_filter('wp_head',function(){ global $WOOCS;if(is_user_logged_in()){ $user = wp_get_current_user(); if ( in_array( 'paste_here_user_b2b_role', (array) $user->roles ) ) { $WOOCS->set_currency('EUR'); return; } } $WOOCS->set_currency('CFA'); });
Hello
If you have no programming experience, you should hire a developer
Unfortunately, code customization is not included in support.
We must display prices according to the user groups created by the B2B King pro application - in this case you should replace this condition with checking the user's role
AN example:
add_filter('wp_head',function(){
global $WOOCS; if(is_user_logged_in()){
$user = wp_get_current_user();
if ( in_array( 'paste_here_user_b2b_role', (array) $user->roles ) ) {
$WOOCS->set_currency('EUR');
return;
}
}
$WOOCS->set_currency('CFA');
});Quote from The on January 22, 2024, 15:41I understand, thank you for your interest. I met with B2BKing developers. They gave me a code. And they said it would help you.With this code, b2b users see euros by default. B2C and non-logged in users see XOF. But there is a problem. Currency switcher not working for B2C and non-logged in users. It only works for b2b users. How we can solve this problem. The code is:
add_action('init', function(){ if (class_exists('WOOCS')){ $user_id = get_current_user_id(); $is_b2b = get_user_meta($user_id,'b2bking_b2buser', true); $already_set = get_user_meta($user_id, 'currency_set', true); if ($already_set !== 'yes'){ global $WOOCS; if ($is_b2b === 'yes'){ $WOOCS->set_currency('EUR'); } else { $WOOCS->set_currency('CFA'); } update_user_meta($user_id, 'currency_set', 'yes'); } } });
I understand, thank you for your interest. I met with B2BKing developers. They gave me a code. And they said it would help you.With this code, b2b users see euros by default. B2C and non-logged in users see XOF. But there is a problem. Currency switcher not working for B2C and non-logged in users. It only works for b2b users. How we can solve this problem. The code is:
add_action('init', function(){
if (class_exists('WOOCS')){
$user_id = get_current_user_id();
$is_b2b = get_user_meta($user_id,'b2bking_b2buser', true);
$already_set = get_user_meta($user_id, 'currency_set', true);
if ($already_set !== 'yes'){
global $WOOCS;
if ($is_b2b === 'yes'){
$WOOCS->set_currency('EUR');
} else {
$WOOCS->set_currency('CFA');
}
update_user_meta($user_id, 'currency_set', 'yes');
}
}
});
Quote from Pablo Borysenco on January 23, 2024, 12:01Hello
Yes, sure! This code overrides the operation of the switcher for non-logged in users.
Try to use
$WOOCS->storage->get_val('currency_set');
and
$WOOCS->storage->set_val('currency_set', 'yes');
Instead of - https://c2n.me/4kbh8oF.png
Hello
Yes, sure! This code overrides the operation of the switcher for non-logged in users.
Try to use
$WOOCS->storage->get_val('currency_set');
and
$WOOCS->storage->set_val('currency_set', 'yes');
Instead of - https://c2n.me/4kbh8oF.png