How should the currency list look?



  • The attached screenshot show my currency list. As you can see the “Exchange Rate Service” column is empty. I have fixer.io installed and enabled the 1.0.2 version. Running TB 1.0.1

    Is fixer runnng or not?0_1493970217968_Screenshot 2017-05-05 10.34.07.png


  • administrators

    It should be. Check back over the next day or two and see if they are updated or changed.



  • It seems not. If I change one rate manually and then press update it does not change. so that is wrong.

    If I use the cron link I get this
    Warning: Invalid argument supplied for foreach() in /var/www/vhosts/beautyandpleasure.co.uk/httpdocs/classes/Currency.php on line 268


  • administrators

    It should show fixer.io in the exchange rate service column. At least, that’s what I see on production.

    Thanks for mentioning the line number. It allowd us to check what’s different from what we see.



  • @mdekker I deleted the module even if it said 1.0.2 after updating the TB from 1.0.0 to 1.0.1. Downloaded a new one from Github and installed. Now Fixerio is shown in a dropdown in the service column and the update works.

    The Cron is still broken and show the same error as before



  • Is there a diffference between the source of the rates between the Update Currency rates button and the cron ?


  • administrators

    I’m going to check the module again. We might have forgotten some circumstances we are not seeing on production.


  • administrators

    Replacing the function Currency::refreshCurrencies in /classes/Currency.php with

    public static function refreshCurrencies()
        {
            if (!$defaultCurrency = Currency::getDefaultCurrency()) {
                return Tools::displayError('No default currency');
            }
    
            $currencyRates = CurrencyRateModule::getCurrencyRateInfo();
            if (!is_array($currencyRates)) {
                return null;
            }
            $currencyRates = array_filter($currencyRates);
            $moduleRates = [];
            foreach ($currencyRates as $currency => $module) {
                if (Tools::strtoupper($currency) === Tools::strtoupper($defaultCurrency->iso_code)) {
                    continue;
                }
                if (!isset($moduleRates[$module->id])) {
                    $moduleRates[$module->id] = [Tools::strtoupper($currency)];
                } else {
                    $moduleRates[$module->id][] = Tools::strtoupper($currency);
                }
            }
    
            foreach ($moduleRates as $idModule => $currencies) {
                $response = Hook::exec('actionRetrieveCurrencyRates', ['currencies' => $currencies, 'baseCurrency' => Tools::strtoupper($defaultCurrency->iso_code)], $idModule, true);
                if (!is_array($response)) {
                    continue;
                }
                foreach ($response as $rates) {
                    foreach ($rates as $isoCode => $rate) {
                        $currency = Currency::getCurrencyInstance(Currency::getIdByIsoCode($isoCode));
                        $currency->conversion_rate = $rate;
    
                        $currency->save();
                    }
                }
            }
    
            return null;
        }
    

    Should solve it



  • Instead of the error I now get a blank screen and no currency update with the cron link. The other refresh still works


  • administrators

    Hmmz, we’re not there yet indeed


  • administrators

    Seems like we are. It’s updating the value here on production and I found that the original cron_currency_rates.php file was designed to show just a blank page on success. You should watch the HTTP response code to know if it was successful or not.



  • But it is easy to check. Manually change one currency to something wrong, then hit the link. If the currency dont change it does not work. And that is the case here


  • administrators

    Strange. It keeps changing the currency to a value that is correct (EUR => USD 1.0938 today). I can see it contact fixer.io’s server, so that’s not it. Maybe it’s fixed by some other change. I’m running the latest code on production (yes, I like to live dangerously). We’ll keep looking.



  • Perhaps you should install an official 1.0.1 so you experience what users experience ;-)


  • administrators

    Yeah, also works.



  • I will test it on a clean install 1.0.1 that is not updated from1.0.0



  • OK tested on clean install. Installed fixerio that was 1.0.0. Said needs update. Pressed update now. 500 Internal server error

    LWJJDugSJqI=hftkgwfhWlA=KvcGVKcdOyk=AHBvDqqeSkU=2DAS11o/8F8=ELgtDM8QT18=Qag+3oZKHZA=B4TjkASVDpc=+1M0OAI+56M=xZeVrK6AjjI=nr0KIP89JZU=r04mW6ZB0XI=Wxa4LNXl3c0=u5R7QG1rMhY=JsPGaTKkQlQ=colxmt1DJsA=2i0UEoTttNU=ehU3flHNR1U=VDqUhhIeL0c=O2PFw36N1bg=vZDqE5d5D9I=Wth6oNrBQ6w=9HBD+D1tA3s=9Gr+f51m1+8=8pGNOsVPjGI=MqI18hrjp/o=Yjq4lkLUSz0=ncKs+/12dc8=8pGNOsVPjGI=JTQmJDZOFbg=vqTAqfRJrrQ=kUUKc1XTmiE=C5xwLrw/FgI=hrDCJevU/0A=H3w/BabHBTw=8pGNOsVPjGI=ZwdUNgjU37Q=qxJ9GSanYoo=YNiN7SVO3Qs=PnX+aKE2pNw=93Prlgz5pEA=QzH1SuGo3Bg=1zlhN9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PjGI=8pGNOsVPjGI=D7D9p6e5YzQ=RLLkvSkWKSs=AonbQWlWNME=WQHG0XkX5X0=XP0bv/y/V2E=LyZS+ABPlj0=fDJEf3hWtJ8=rkPKRFPwUZ0=94hTYiVwQYo=G/uHkTVbndI=IUGdQo2JfW0=4kfy5D2HfdM=H5bfnh1DHSs=BkEfUss3Wrg=vQgwRE/gtIA=DaF8mWQZ+aY=wqqtWRuCw/Y=xnR7PkbiILc=fAw3f7Pmenw=CtxX+ott8u0=6lBIK+l/tvo=T2ZSpDRqCi4=iGMZXTRYbyM=s/+8PMwTwng=kDjTvqgv+v4=1NusGVu6PbE=95AhliOoPzA=C3vFqRWaO1Q=Zf0Q64ltj/0=1NusGVu6PbE=5cB42wCDwao=nCmNuNg+zRk=bhwuX/2bq44=Qiw+3DYay8I=UrX265qBGv4=GKPUm4vJf8E=/UaAH42KiF4=0uKpaQQG1IE=HEkoUvcR4jw=dTZP2p/vWoA=C+Ipxrid8TE=P0bQ+gN1NxQ=4IxEQU2/M9g=hF1MqM6SQxA=jtsWnah6rAM=tDWOE4QtHxY=47XXU6jCteI=Pb/dCqgodLc=e3FYjOvN0to=24owZZxjytg=VyehP0wxPs8=004929



  • Deleted the 1.0.0 module and uploaded a 1.0.2 from Github. No install problem and the cron works



  • So, seem to be a difference between an updated 1.0.0 and a clean installed 1.0.1


  • administrators

    Thanks for your further research!


Log in to reply
 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.