Round prices last digits

  • Posts: 1028
  • Thank you received: 11
  • Hikashop Business
1 year 7 months ago #344761

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 3.10.11

Hello!

I would like to round the prices for example from 22,93 € to be 23 €
I enabled the Round prices during calculations but nothing changed and then i added number 10 in Rounding increment of Currency options but it affects the prices the wrong way (for example 22 € to 20 €)

How can i do that?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13086
  • MODERATOR
1 year 7 months ago #344764

Hi,

The "round prices during calculations" option is to choose whether to round the prices in between the different calculations (between adding taxes to the unit price and the multiplication of the taxed unit price with the quantity, between the sub total calculation and the coupon calculation, etc). This bases itself on the "rounding increment", the "International fractional digits" and "National fractional digits" settings of the currency. So just changing the "round prices during calculations" option won't change the number of decimals of prices, that's normal.
The "rounding increment" is to be able to support odd roundings like rounding every 0.25 cents (you would enter 0.25 in the input).
I would recommend leaving that setting empty in your case and changing the "International fractional digits" and "National fractional digits" settings to 0 instead of 2 decimals.

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 1028
  • Thank you received: 11
  • Hikashop Business
1 year 7 months ago #344773

Hi!

Thank you Nicolas i tried that but it removes basically the last 2 digits of the price and i tested a product with price 29,54 € and it changed it to 30 € . It should be 29,50 €

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 81633
  • Thank you received: 13086
  • MODERATOR
1 year 7 months ago #344783

Hi,

It's normal that 29.54 becomes 30 with this setup.
From what you wrote in your first message, that's what I understood you wanted.
What rounding do you want then ?
What prices do you want to allow ? 29€, 29.50€ and 30€ only ?
In that case, you should revert these digit settings to 2, and change the rounding increment to 0.5

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum