Rounding
Note
Rounding as a feature is not available in DynamicWeb10
Rounding methods are methods which take a price and reformats it to some standard pricing practice - e.g. prices ending in .99´ or .95. This can be necessary if e.g. currency conversions or VAT creates odd prices, or if the customer desires uniform pricing for a currency.
To create a rounding method:
- Click New rounding rule
- Provide a name
- Choose a rounding method
- Up
- Down
- Nearest
Then configure the rounding method:
If you're dealing with whole numbers or integers:
- Choose a ModIntegerPart value: This is the number by which your price's integer part will be divided for rounding purposes. You can also choose a optional ModIntegerCorrection value to add or subtract from the result after rounding.
- Example: If you choose the 'Nearest' method with a ModIntegerPart of 10, your prices will be rounded as follows:
- 134 becomes 130
- 135 becomes 140
- 159 becomes 160
- If you then set the ModIntegerCorrection to -1, your rounded prices will be adjusted like this:
- 134 becomes 129
- 135 becomes 139
- 159 becomes 159
- Example: If you choose the 'Nearest' method with a ModIntegerPart of 10, your prices will be rounded as follows:
When working with decimal numbers:
- Set the number of decimals: The number of decimals is crucial as it affects the scale of the rounding in relation to the total price.
- Choose a ModDecimalPart: This is the number by which your price's decimal part will be divided for rounding. You can also choose an optional ModDecimalCorrection to add or subtract from the result after rounding.
- Example: If the ModDecimalPart is set to 10 and you set 1 decimal (e.g. 1.0), all your prices will round to whole numbers (1.0, 2.0, 3.0, etc.).
- If the ModDecimalPart is 10 and you set 2 decimal places (e.g. 1.00), your prices will round to the nearest tenth (0.1, 0.2, 0.3, etc.).
Rounding methods are applied to currencies. You cannot apply two rounding methods to a currency - if this happens for any reason, e.g. through custom code, neither rule will be applied.