- In your PrestaShop admin panel go to Preferences -> General section:
- Once taxes and discount are applied, a price can feature too many decimals, such as $42.333333333. The round mode is used throughout PrestaShop, in the front-office price display as well as during the price calculation process (taxes, discount, etc.). In and off themselves, they change little to the way things are calculated, but the impact is much bigger once taken into account in the invoice total when many items are added up to taxes and discounts.
- For the Round mode option, you can set the following modes:
- Round up away from zero, when it is halfway there. This is the recommended mode. 42.55555555 becomes 42.56.
- Round down towards zero, when it is halfway there. 42.55555555 becomes 42.56.
- Round towards the next even value. 42.55555555 becomes 42.56.
- Round towards the next odd value. 42.55555555 becomes 42.56.
- Round up to the nearest value. 42.55555555 becomes 42.56.
- Round down to the nearest value. 42.55555555 becomes 42.55.
- The Round type option allows choosing the type rounding, which can greatly impact the calculation of the total. There are three Round types:
- Round on each item. Each item price will be rounded before the calculation of the total. If there is more than one of the same items, each of those will be rounded separately before the calculation.
- Round on each line. Each line of items will be rounded before the calculation of the total. If there are more than one of the same items, the rounding will be done on their total value.
- Round on the total. The rounding will only be done on the final calculation after the values of all items have been added up.
- You can set the Number of decimals:
- If you choose “0”, 42.333333333 becomes 42.
- If you choose “1”, 42.333333333 becomes 42.3.
- If you choose “2”, 42.333333333 becomes 42.33.
- If you choose “3”, 42.333333333 becomes 42.334.
Hopefully, this tutorial was helpful for you.