Quote from Joao on March 28, 2024, 14:06
Hi!
First of all thanks to all creators of FOX.
I'm using this plugin to change our fixed product prices over 3 currencies. Have B2C and a B2B setup.
Hope that this post helps another user to achieve their goals. (This post was closed so need to start a new one: https://pluginus.net/support/topic/fox-doesn-t-work-while-wp-rocket-is-active/)
On B2B I have this special code that hides "currency switch" at login and manually overrides currency for that group of users. ($ for usa_retailers, € for europe_retailers, £ for uk_retailers)
[code]
function change_currency_on_login() {
global $WOOCS;
if (is_guest()) {
echo '<style >.menu-woocs { display: block; }</style>';
}
else if (is_costumer()) {
echo '<style >.menu-woocs { display: block; }</style>';
}
else if (is_retailer_northamerica()) {
$WOOCS->set_currency('USD');
echo '<style >.menu-woocs { display: none; }</style>';
}
else if (is_retailer_australia()) {
$WOOCS->set_currency('EUR');
echo '<style >.menu-woocs { display: none; }</style>';
}
else if (is_retailer_europe()) {
$WOOCS->set_currency('EUR');
echo '<style >.menu-woocs { display: none; }</style>';
}
else if (is_retailer_uk()) {
$WOOCS->set_currency('GBP');
echo '<style >.menu-woocs { display: none; }</style>';
}
else {
echo '<style >.menu-woocs { display: block; }</style>';
}
}
add_action('template_redirect', 'change_currency_on_login');
[/code]
On my options I have:
PHPSESSID in WpRocket never cache cookies.
"WelcomeCurrency" set to EUR
"Currency Storage" set to FOXSESSION
No GET data in link" ENABLED
"I am using cache plugin on my site" DISABLED
"Checkout by GeoIP rules" DISABLED
And this is all working. Dunno why "I am using cache plugin on my site" needs to be DISABLED because is kind of controversial... but well. Things happen!
Hi!
First of all thanks to all creators of FOX.
I'm using this plugin to change our fixed product prices over 3 currencies. Have B2C and a B2B setup.
Hope that this post helps another user to achieve their goals. (This post was closed so need to start a new one: https://pluginus.net/support/topic/fox-doesn-t-work-while-wp-rocket-is-active/)
On B2B I have this special code that hides"currency switch" at login and manually overrides currency for that group of users. ($ for usa_retailers, € for europe_retailers, £ for uk_retailers)
[code]
function change_currency_on_login() {
global $WOOCS;
if (is_guest()) {
echo '<style >.menu-woocs { display: block; }</style>';
}
else if (is_costumer()) {
echo '<style >.menu-woocs { display: block; }</style>';
}
else if (is_retailer_northamerica()) {
$WOOCS->set_currency('USD');
echo '<style >.menu-woocs { display: none; }</style>';
}
else if (is_retailer_australia()) {
$WOOCS->set_currency('EUR');
echo '<style >.menu-woocs { display: none; }</style>';
}
else if (is_retailer_europe()) {
$WOOCS->set_currency('EUR');
echo '<style >.menu-woocs { display: none; }</style>';
}
else if (is_retailer_uk()) {
$WOOCS->set_currency('GBP');
echo '<style >.menu-woocs { display: none; }</style>';
}
else {
echo '<style >.menu-woocs { display: block; }</style>';
}
}
add_action('template_redirect', 'change_currency_on_login');
[/code]
On my options I have:
PHPSESSID in WpRocket never cache cookies.
"WelcomeCurrency" set to EUR
"Currency Storage" set to FOXSESSION
No GET data in link" ENABLED
"I am using cache plugin on my site" DISABLED
"Checkout by GeoIP rules" DISABLED
And this is all working. Dunno why"I am using cache plugin on my site" needs to be DISABLED because is kind of controversial... but well. Things happen!