Kalpesh Posted March 31, 2011 Share Posted March 31, 2011 Hi, i am trying to change the currency symbols as an image, in Prestashop 1.3.2, i have seen several posts regarding " currency as Image" My issue is i want to change the front end currencies kindly check the attached Screen shot of requirement...please help with the code and the in which file i need to do changes...Thanks in advance Cheers!!!! Link to comment Share on other sites More sharing options...
Kalpesh Posted April 8, 2011 Author Share Posted April 8, 2011 Anyone please please helpme Link to comment Share on other sites More sharing options...
VNguyen Posted April 8, 2011 Share Posted April 8, 2011 Hi,There is no general solution for your request. You need to replace each occurrence of currency (in text) by your pics in every module which you used. And of course for every .tpl file under $PS_DIR/themes/$YOUR_THEME_NAMERegards,VNguyen Link to comment Share on other sites More sharing options...
Kalpesh Posted April 8, 2011 Author Share Posted April 8, 2011 Thanks VNguyenBut extremely sorry its really helpful if you help me with the code for using the images and file names in which i need to change the coding, i am using default prestashop theme... the version is 1.3.2Many thanks for your post Link to comment Share on other sites More sharing options...
VNguyen Posted April 8, 2011 Share Posted April 8, 2011 Hi,I think I found out the general solution, please do following my steps:#1. Put your currency sign image under $PS_DIR/img/currency_sign.jpgAssume that your image name "currency_sign.jpg". You can change its name yourself and also change corresponding name in step #2#2. Open to edit this file: $PS_DIR/classes/Tools.phpSearch this function: public static function displayPrice($price, $currency = NULL, $no_utf8 = false) Replace the definition of variable $c_char from $c_char = (is_array($currency) ? $currency['sign'] : $currency->sign); to $c_char = ''; Done.I test on my localhost with PS 1.4, and it works fine on all module. Hope that it is useful.Regards,VNguyen Link to comment Share on other sites More sharing options...
Kalpesh Posted April 8, 2011 Author Share Posted April 8, 2011 Hey Many Thanks...i will surely test it ...just one question ... is it going to replace all the currency symbols with images...? Link to comment Share on other sites More sharing options...
VNguyen Posted April 8, 2011 Share Posted April 8, 2011 Hi,This function is used for every standard function to display its currency symbol + its value. So it will assume that it will replace all currency symbol in text by your pic, except on certain module from third parties which does not follow PS standard.Please do some quick test at your end to make sure it works. It will be so great if I can help you and to heard that that's what you want.Regards,VNguyen Link to comment Share on other sites More sharing options...
Kalpesh Posted April 8, 2011 Author Share Posted April 8, 2011 HI its giving me error <'img/rupee.png'.'">'; on block cart ,and on top cart notification its working great on front page is there any solution?Thanks in advance Link to comment Share on other sites More sharing options...
VNguyen Posted April 8, 2011 Share Posted April 8, 2011 Hi,Can you give me your pic and Tools.php, I will investigate to see if there is any wrong on your files.Regards,VNguyen Link to comment Share on other sites More sharing options...
chitraranjan Posted June 26, 2014 Share Posted June 26, 2014 if (is_array($currency)) { $c_char = '<img src="http://1.bp.blogspot.com/-FO4PJ6WqyOs/U6vCv7dHQII/AAAAAAAAAE8/IZDbsQrS7gM/s1600/rupee-symbal2.png">'; $c_format = $currency['format']; $c_decimals = (int)$currency['decimals'] * _PS_PRICE_DISPLAY_PRECISION_; $c_blank = $currency['blank']; } elseif (is_object($currency)) { $c_char = '<img src="http://2.bp.blogspot.com/--2cHjt0aEWA/U6vCv7CKSEI/AAAAAAAAAE4/YJTt14ufuJw/s1600/rupees-symbol3.png">'; $c_format = $currency->format; $c_decimals = (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_; $c_blank = $currency->blank; } else return false; put this code under the line public static function displayPrice($price, $currency = NULL, $no_utf8 = false) work in PS v 1.6 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