Jump to content

How to add more decimals to unit_price in the buy_block?


Antonio sc

Recommended Posts

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

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.

post-281236-0-18316100-1316001761_thumb.jpg

Link to comment
Share on other sites

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

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

post-281236-0-25228200-1316089631_thumb.png

Link to comment
Share on other sites

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

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

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

  • 3 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...