yes, I wrote already very simple PHP script, auto-updating prices with cron every 30 mins, but my trouble is auto set the currency for people visiting website.
no problem, with existing users, all of my users will buy with ZWL but because i'm buying all my servers and services from Europen and US service providers i must set the base price base on USD, the economy in this part of the world not so stable you know 🙂 , so I'm trying to not get into trouble with sudden currency price change trouble.
so base price should be on USD and ZWL price get the calculated base on currency exchange rates.
Hi, all of my product selling is base on USD (default) but the customers paying me on ZWL so every couple minutes currency prices updated.
but I need to remove choose currency sidebar and set the currency for all customers ZWL or the currency id in my whmcs 3, I couldn't find any solution for that in the community so I opened a thread
so far what I could manage is like this:
/// disabing currency selection *********** its working no problem
add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) {
$secondarySidebar->removeChild('Choose Currency');
});
/// changing the currency *********** its not working right :(((
function hook_change_cart_currency($vars) {
$currentcurrency = $vars['currency'];
if ($currentcurrency['code'] != "ZWL" OR $_GET["currency"] != "3") {
if ( $_GET["currency"] != "6") {
if (App::getCurrentFilename() == 'cart' && $a=='checkout') {
header('Location: cart.php?a=checkout¤cy=3');
exit;
}
can you help with the second part :) thanks