billy27 Posted June 25, 2010 Share Posted June 25, 2010 Hey,Since a couple of days i have a problem with the currencies conversion, infact there is no convertion all €64 = 64$yes i update all the currencies in my BO so euro=1, dollar, 1.23 and pound, 0.82 so that's fine.i have two shops the same theme, so i tought i replace the files, blockcurrencies and the files tools.php in classes and the file tools.js in my theme folder.still not working.is there an other file i should replace or look at?please help, i already looking for hours and nothing helps.thanks in advanceB Link to comment Share on other sites More sharing options...
SpyrosT Posted June 26, 2010 Share Posted June 26, 2010 Are these two shops on the same host? Some hosts blocking the currency XML feed.Take a look here. http://www.prestashop.com/forums/viewthread/6508 Link to comment Share on other sites More sharing options...
billy27 Posted June 26, 2010 Author Share Posted June 26, 2010 hey, yes they are on the same host, i worked before, so it should work again i suppose. i can copy files from the working shop into the not working, but witch are related to the currency conversion?Thx,B Link to comment Share on other sites More sharing options...
SpyrosT Posted June 26, 2010 Share Posted June 26, 2010 Did you try to unistall the blockcurrencies and delete from modules folder and then copy the working one and install again? Link to comment Share on other sites More sharing options...
billy27 Posted June 26, 2010 Author Share Posted June 26, 2010 yes,i deleted the blockcurrencies and placed it again and reinstelled it.i guess it must be around the files tools.hp in classes and tools.js in my theme.like i puted like prestashop asked:File: /classes/Tools.phpWhere: Line 17After "class Tools{"Add these two functions:/*** Get the server variable SERVER_NAME** @param string $referrer URL referrer*/static function getServerName(){if (isset($_SERVER['HTTP_X_FORWARDED_SERVER']) AND $_SERVER['HTTP_X_FORWARDED_SERVER'])return $_SERVER['HTTP_X_FORWARDED_SERVER'];return $_SERVER['SERVER_NAME'];}/*** Secure an URL referrer** @param string $referrer URL referrer*/static public function secureReferrer($referrer){if (preg_match('/^http?:\/\/'.self::getServerName().'\/.*$/Ui', $referrer))return $referrer;return __PS_BASE_URI__;}altough i replaced the old files (tools.php) back, but then i get a white screen on my shop, so that's even worse.i will try to replace and reinstall the blockcurrencies again, but ...thx,B Link to comment Share on other sites More sharing options...
billy27 Posted June 26, 2010 Author Share Posted June 26, 2010 nope,i replaced, and reinstalled the blockcurrenciesreplaced the tools.php and tools.js from my working shop.and none of these seem to work.anybody know wich other files i should look or replace?Thx,B Link to comment Share on other sites More sharing options...
SpyrosT Posted June 26, 2010 Share Posted June 26, 2010 Try with cyrrency.php in classes but keep a backup first since there are strings about database in. Link to comment Share on other sites More sharing options...
billy27 Posted June 26, 2010 Author Share Posted June 26, 2010 thanks,i just replaced currency.php in classes it, but it diden't help.any help is welcome,thanks in advance,B Link to comment Share on other sites More sharing options...
andries Posted June 30, 2010 Share Posted June 30, 2010 I am helping Billy27 on this project.As far as I can see is it only the price display that is incorrect, and not the price itself. When finishing the order, the prices are correct in the backoffice in the correct currency.So I thought I need to change the function displayPrice in tools.php. However when I added the following line: $price = self::convertPrice($price, $currency); ... the prices are shown correctly all over the site, but they are "double" converted when they arrive in the order stage.So I concluded that it might be one of the two following situations:- this line is indeed needed in Tools.php, and I need to adapt the conversion between cart and order- it is only the display that is incorrect, and I need to adapt a function, but apparently not displayPrice().I hope someone can give us a clue... Link to comment Share on other sites More sharing options...
gk Posted July 13, 2010 Share Posted July 13, 2010 related to this bug?http://www.prestashop.com/bug_tracker/view/3552/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now