[Skip to main content](#vessel-content)

#   Wrong Calculation of Total Price

##

- **[asator](/forum/user/31375-asator "View asator's Profile")**
- [![asator's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31375-asator "View asator's Profile") Topic Author
- [ Offline](/forum/user/31375-asator)

Less More

- Posts: 17
- Thank you received: 0
-
-

12 years 8 months ago [\#147124](#147124) by [asator](/forum/user/31375-asator "View asator's Profile")  *[Wrong Calculation of Total Price](/forum/3-bug-report/866437-wrong-calculation-of-total-price#147124 "-- url of the page with the problem -- :   www.tympanusforte.de  -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 3.2.2 Stable -- PHP version -- :5.3.3-7  Hey there,  i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.  So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.  On my page go to the shop and add 3 &quot;Ticket Requiem Sitzplatz&quot; to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.  This will not happen if you choose the Stehplatz Ticket, on this product it is allright.  To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.  I have tried to change some .php files like described in this post:   www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html  but it doesnt help.  could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?  Thanks to you all,  Frank")* was created by *[asator](/forum/user/31375-asator "View asator's Profile")*

-- url of the page with the problem -- : [ www.tympanusforte.de](http://www.tympanusforte.de)
-- HikaShop version -- : HikaShop Essential: 2.3.0
-- Joomla version -- : 3.2.2 Stable
-- PHP version -- :5.3.3-7

Hey there,

i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.

So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.

On my page go to the shop and add 3 "Ticket Requiem Sitzplatz" to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.

This will not happen if you choose the Stehplatz Ticket, on this product it is allright.

To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.

I have tried to change some .php files like described in this post: [ www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html](http://www.hikashop.com/forum/3-bug-report/865949-order-total-incorrect-on-site.html) but it doesnt help.

could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?

Thanks to you all,

Frank

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjY0Mzctd3JvbmctY2FsY3VsYXRpb24tb2YtdG90YWwtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

12 years 8 months ago [\#147148](#147148) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Wrong Calculation of Total Price](/forum/3-bug-report/866437-wrong-calculation-of-total-price#147148 "-- url of the page with the problem -- :   www.tympanusforte.de  -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 3.2.2 Stable -- PHP version -- :5.3.3-7  Hey there,  i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.  So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.  On my page go to the shop and add 3 &quot;Ticket Requiem Sitzplatz&quot; to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.  This will not happen if you choose the Stehplatz Ticket, on this product it is allright.  To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.  I have tried to change some .php files like described in this post:   www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html  but it doesnt help.  could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?  Thanks to you all,  Frank")*

Hi Frank,

This is indeed probably something linked to the tax calculation.
If you have price with 3 digit after the dot or even 2 digit but a tax with decimals as well, then the calculation will give results like xx.xxx which have to be displayed like xx.xx
So what you can do is play with the options in the configuration to round the prices so the calculation will be rounded and you shouldn't encounter this issue.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjY0Mzctd3JvbmctY2FsY3VsYXRpb24tb2YtdG90YWwtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[asator](/forum/user/31375-asator "View asator's Profile")**
- [![asator's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31375-asator "View asator's Profile") Topic Author
- [ Offline](/forum/user/31375-asator)

Less More

- Posts: 17
- Thank you received: 0
-
-

12 years 8 months ago [\#147219](#147219) by [asator](/forum/user/31375-asator "View asator's Profile")  Replied by *[asator](/forum/user/31375-asator "View asator's Profile")* on topic *[Wrong Calculation of Total Price](/forum/3-bug-report/866437-wrong-calculation-of-total-price#147219 "-- url of the page with the problem -- :   www.tympanusforte.de  -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 3.2.2 Stable -- PHP version -- :5.3.3-7  Hey there,  i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.  So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.  On my page go to the shop and add 3 &quot;Ticket Requiem Sitzplatz&quot; to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.  This will not happen if you choose the Stehplatz Ticket, on this product it is allright.  To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.  I have tried to change some .php files like described in this post:   www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html  but it doesnt help.  could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?  Thanks to you all,  Frank")*

thanks eliot,

i tried to unmark the rounding option in the config but this wouldnt help. The rounding option was on when this problem first came up.

Is there a way to change the count of the decimals? to only have 2 or 3?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjY0Mzctd3JvbmctY2FsY3VsYXRpb24tb2YtdG90YWwtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

12 years 8 months ago [\#147336](#147336) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Wrong Calculation of Total Price](/forum/3-bug-report/866437-wrong-calculation-of-total-price#147336 "-- url of the page with the problem -- :   www.tympanusforte.de  -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 3.2.2 Stable -- PHP version -- :5.3.3-7  Hey there,  i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.  So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.  On my page go to the shop and add 3 &quot;Ticket Requiem Sitzplatz&quot; to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.  This will not happen if you choose the Stehplatz Ticket, on this product it is allright.  To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.  I have tried to change some .php files like described in this post:   www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html  but it doesnt help.  could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?  Thanks to you all,  Frank")*

Hi,

When the option "round prices during calculiations" is on, the number of digits will be fix.
The rounding function have a default value of 2 digits. It can use the value of the currency configuration.
To change it I guess that the best will be to edit directly the class price file.

I have to admit that Nicolas is the expert of this part but he is currently in the Joomla day in Copenhagen.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjY0Mzctd3JvbmctY2FsY3VsYXRpb24tb2YtdG90YWwtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[asator](/forum/user/31375-asator "View asator's Profile")**
- [![asator's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31375-asator "View asator's Profile") Topic Author
- [ Offline](/forum/user/31375-asator)

Less More

- Posts: 17
- Thank you received: 0
-
-

12 years 8 months ago [\#147748](#147748) by [asator](/forum/user/31375-asator "View asator's Profile")  Replied by *[asator](/forum/user/31375-asator "View asator's Profile")* on topic *[Wrong Calculation of Total Price](/forum/3-bug-report/866437-wrong-calculation-of-total-price#147748 "-- url of the page with the problem -- :   www.tympanusforte.de  -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 3.2.2 Stable -- PHP version -- :5.3.3-7  Hey there,  i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.  So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.  On my page go to the shop and add 3 &quot;Ticket Requiem Sitzplatz&quot; to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.  This will not happen if you choose the Stehplatz Ticket, on this product it is allright.  To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.  I have tried to change some .php files like described in this post:   www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html  but it doesnt help.  could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?  Thanks to you all,  Frank")*

hey,

the problem is not, that the rounding option uses 2 digits, but the price without taxes has 5 digits. To get the total of the order hikashop calculates with this price, so at the end i get this 1cent offset, is nicolas back from the Joomla day? ![:-)](/media/kunena/emoticons/3.png ":-)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjY0Mzctd3JvbmctY2FsY3VsYXRpb24tb2YtdG90YWwtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

12 years 7 months ago [\#148587](#148587) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong Calculation of Total Price](/forum/3-bug-report/866437-wrong-calculation-of-total-price#148587 "-- url of the page with the problem -- :   www.tympanusforte.de  -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 3.2.2 Stable -- PHP version -- :5.3.3-7  Hey there,  i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.  So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.  On my page go to the shop and add 3 &quot;Ticket Requiem Sitzplatz&quot; to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.  This will not happen if you choose the Stehplatz Ticket, on this product it is allright.  To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.  I have tried to change some .php files like described in this post:   www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html  but it doesnt help.  could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?  Thanks to you all,  Frank")*

Hi,

HikaShop will always store the prices with 5 decimals if the "round prices during calculations" option is turned off. If it's turned on, it will round the prices to 2 decimals (if that's how your currency is configured) and save these rounded prices in the database.
I checked on my end but the display is always consistent between the emails, the invoice, the checkout, etc.
Please make sure that you try for a new order when you change the option because you won't see the change for existing orders.
Maybe that could explain your situation ?

regarding the other thread you mentioned, it was about rounding issues with coupon calculations. So if won't change anything if you don't have any coupon applied to your order. There are no rounding issue with product prices calculations as far as I could test and no one else reported such issue so far.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjY0Mzctd3JvbmctY2FsY3VsYXRpb24tb2YtdG90YWwtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[asator](/forum/user/31375-asator "View asator's Profile")**
- [![asator's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31375-asator "View asator's Profile") Topic Author
- [ Offline](/forum/user/31375-asator)

Less More

- Posts: 17
- Thank you received: 0
-
-

12 years 7 months ago [\#148638](#148638) by [asator](/forum/user/31375-asator "View asator's Profile")  Replied by *[asator](/forum/user/31375-asator "View asator's Profile")* on topic *[Wrong Calculation of Total Price](/forum/3-bug-report/866437-wrong-calculation-of-total-price#148638 "-- url of the page with the problem -- :   www.tympanusforte.de  -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 3.2.2 Stable -- PHP version -- :5.3.3-7  Hey there,  i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.  So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.  On my page go to the shop and add 3 &quot;Ticket Requiem Sitzplatz&quot; to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.  This will not happen if you choose the Stehplatz Ticket, on this product it is allright.  To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.  I have tried to change some .php files like described in this post:   www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html  but it doesnt help.  could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?  Thanks to you all,  Frank")*

Hey nicolas,

could you try my error on the page i reported on? (tympanusforte.de)

You see the error in the shopping cart when you add three "Ticket Requiem Sitzplatz", then the price shown is 1 cent below

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjY0Mzctd3JvbmctY2FsY3VsYXRpb24tb2YtdG90YWwtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 6 months ago [\#153568](#153568) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Wrong Calculation of Total Price](/forum/3-bug-report/866437-wrong-calculation-of-total-price#153568 "-- url of the page with the problem -- :   www.tympanusforte.de  -- HikaShop version -- : HikaShop Essential: 2.3.0 -- Joomla version -- : 3.2.2 Stable -- PHP version -- :5.3.3-7  Hey there,  i have seen other topics with the same issue but i wanted to stay out because mine is a little bit different.  So here´s the thing: In some cases, the total of al products is missing 1 cent. Thats pretty weird, because it only happens with some products.  On my page go to the shop and add 3 &quot;Ticket Requiem Sitzplatz&quot; to the cart, then the total price is 125,99 €, instead of 126€. But if you only add 2 tickets to the cart the price is displayed correct.  This will not happen if you choose the Stehplatz Ticket, on this product it is allright.  To confuse me even more, the wrong price with the 1cent offset is shown to the users when they pay, in the backend, on the invoice BUT NOT in the e-mail the user receives when he buys something.  I have tried to change some .php files like described in this post:   www.hikashop.com/forum/3-bug-report/8659...correct-on-site.html  but it doesnt help.  could it be something with the tax calculation? it it pretty weird that the price of the product without taxes has 6 numbers after the comma, like 39,56443 could this be the problem?  Thanks to you all,  Frank")*

Hello,
I tried to reproduce the issue through your website but I didn't found any "Ticket Requiem Sitzplatz" product, do you still have that issue ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjY0Mzctd3JvbmctY2FsY3VsYXRpb24tb2YtdG90YWwtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.125 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
