Antonio sc Posted September 14, 2011 Share Posted September 14, 2011 I need 5 decimals just at the unit_price in the buy_block.. At the Back Office I type 0.01863 per ..... but the result is 0.02. After checking all forums I couldn't find any solution. I only need to change the decimal at this block. Somebody could address to me how to solve this problem? Thanks. Link to comment Share on other sites More sharing options...
zyko Posted September 14, 2011 Share Posted September 14, 2011 in config/define.inc.php define('_PS_PRICE_DISPLAY_PRECISION_', 2); change the value 2 to 5 Thanks Delonix Link to comment Share on other sites More sharing options...
Antonio sc Posted September 14, 2011 Author Share Posted September 14, 2011 Thanks for your helping, after changing values in defines.inc.php from 2 to 5, I can display 5 decimal but not just in unit_price, there are 5 decimals in all prices in all blocks. Also the unit-price round to 2 decimal (0,08000 per unit and should be 0.08432 per unit) Have you any solution for it.? Thanks for your time. Link to comment Share on other sites More sharing options...
Antonio sc Posted September 14, 2011 Author Share Posted September 14, 2011 Sorry, I was wrong. I introduced again the unit price in the BO ( and display 0.08432). It is perfect. The only problem is all prices are displaid with 5 decimals, not just the unit price. (see attchment) Link to comment Share on other sites More sharing options...
zyko Posted September 14, 2011 Share Posted September 14, 2011 It would be bit customized code - i guess will check and let you know by PM. Not sure posting here publicly will be good or not - because it is for someone's specific need Thanks Delonix Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 14, 2011 Share Posted September 14, 2011 Hi Delonix, It is still a good idea to post your solution here, because others may come looking for this information later on. We don't want them run a search for this issue and come to a dead-end because this was handled over PM, which is why it is actually against the rules of the PrestaShop forum to provide this sort of technical assistance over PM. -Mike Link to comment Share on other sites More sharing options...
Antonio sc Posted September 14, 2011 Author Share Posted September 14, 2011 Delonix and Mike, sorry but I doesn't understand the meaning of your messages. If I have done something wrong, please let me to know, in order to avoid do it in the next future. I just ask to the forum a solution for my topic. Regards Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 14, 2011 Share Posted September 14, 2011 Hi Antonio, Don't worry about my post, that was just a suggestion to Delonix. He'll be able to answer your question. -Mike Link to comment Share on other sites More sharing options...
zyko Posted September 15, 2011 Share Posted September 15, 2011 Ok, please replace the attached two js files in theme folder if you want to change the prices in product info page as shown in screenshot . Please take the backup of original files. themes.zip Link to comment Share on other sites More sharing options...
zyko Posted September 15, 2011 Share Posted September 15, 2011 the solution is for this Link to comment Share on other sites More sharing options...
zyko Posted September 15, 2011 Share Posted September 15, 2011 chk this screenshot Link to comment Share on other sites More sharing options...
Antonio sc Posted September 15, 2011 Author Share Posted September 15, 2011 Zyko,thanks for your time. I have replace the two .js files in theme folder and all prices are with two decimals, same as original prestashop theme. After that I also have changed define('_PS_PRICE_DISPLAY_PRECISION_',5); all prices are display with 5 decimals, looks like the zip.zile doesn't change anything. the result is like the attachment Link to comment Share on other sites More sharing options...
zyko Posted September 15, 2011 Share Posted September 15, 2011 where you put that files , in themes/your theme folder/js ??? after putting that file - even if you ('_PS_PRICE_DISPLAY_PRECISION_',5); cahnged to ('_PS_PRICE_DISPLAY_PRECISION_',2); the price on product info page would be shown upto 5 decimal point if you still keep ('_PS_PRICE_DISPLAY_PRECISION_',5); then all prices would also show upto 5 decimal points Thanks Delonix Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 15, 2011 Share Posted September 15, 2011 Hi Antonio, Have you cleared your cache and regenerated htaccess yet? -Mike Link to comment Share on other sites More sharing options...
zyko Posted September 15, 2011 Share Posted September 15, 2011 Hi Antonio, Have you cleared your cache and regenerated htaccess yet? -Mike yup this would be another constarin - you need to clear cache Thanks Delonix Link to comment Share on other sites More sharing options...
Patric Posted September 15, 2011 Share Posted September 15, 2011 Topic moved into the "Develoment" section. Link to comment Share on other sites More sharing options...
Antonio sc Posted September 15, 2011 Author Share Posted September 15, 2011 Hello, I have done it with BO: Smarty: "Forzar compilacion" YES and "Cache" YES CCC: All with original function Cache: "Use cache" No Sorry, but I am not advanced user, I don't know how to clear the cache. I have regenerated htaccess. I am aware you are wasting a lot of time for this issue, but It could be very interesting for many user, to have the possibility to display boxes price with two decimals and show how much is the price for each unit inside the box, with more decimals. I have some boxes with 1000 units, for this reason is important to have at least 4 decimals in unit price. Sorry for the inconvinients. Antonio. Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 15, 2011 Share Posted September 15, 2011 Hi Antonio, It's no inconvenience at all, we're here to help you . Is this working for you yet, or are you still trying to find the solution? -Mike Link to comment Share on other sites More sharing options...
Antonio sc Posted September 15, 2011 Author Share Posted September 15, 2011 Hello friend, I am still trying to find the solution. I can display five decimals, but not only at the unit-price. The five decimals are displied in all prices. Really could be very useful, to have the possibility at the BO, to choose how many decimal per unity. Good night Mike Link to comment Share on other sites More sharing options...
Mike Kranzler Posted September 15, 2011 Share Posted September 15, 2011 Hi Antonio, If you would like, you can create a Feature Request to ask our development team to consider that as a default feature in future versions. You can do so here: http://forge.prestashop.com/secure/CreateIssue!default.jspa -Mike Link to comment Share on other sites More sharing options...
Antonio sc Posted September 15, 2011 Author Share Posted September 15, 2011 O.K, I will do it, right know. Antonio Link to comment Share on other sites More sharing options...
rcforus Posted January 27, 2015 Share Posted January 27, 2015 does any one have sollution for presta 1.5.4? 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