Skip to the content
Documentation

Rounding auto prices

No ratings yet

Auto prices are converted with exchange rates, so they rarely come out as round numbers. shop.ini [MathSettings] decides how they are rounded. Custom prices are never rounded.

[MathSettings]
# eZPHPMath: PHP floating point; eZBCMath: the bcmath extension
MathHandler=eZPHPMath
# digits after the decimal point in calculations (eZBCMath only)
MathScale=10
# none, round, ceil or floor
RoundingType=round
# digits after the decimal point that are kept
RoundingPrecision=2
# false, or the last digits a rounded price should end in
RoundingTarget=false

RoundingTarget

With a target, the price is rounded so that its last digits are the target. For 89.468543 with RoundingPrecision=2:

RoundingTarget Result
false 89.47
5 89.45
99 89.99

After changing these settings, clear the INI cache and press Update autoprices on Store > Currencies to recalculate the stored auto prices.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.