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

#   Order Product List tax amount error

##

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 9 months ago [\#5302](#5302) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  *[Order Product List tax amount error](/forum/3-bug-report/5302-order-product-list-tax-amount-error#5302 "I was getting a strange rounding error in the product list of the administration / sales / order screen.  Was not sure if it was something I had done, but after drilling through the stack I think it is due to line 21 in classes/order&#95;product.php where the tax amount is being cast to an integer in method save().  Removing the (int) cast appears to resolve the issue.")* was created by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")*

I was getting a strange rounding error in the product list of the administration / sales / order screen.

Was not sure if it was something I had done, but after drilling through the stack I think it is due to line 21 in classes/order_product.php where the tax amount is being cast to an integer in method save(). Code:

','.(int)$product-&gt;order_product_tax.','

Removing the (int) cast appears to resolve the issue.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81MzAyLW9yZGVyLXByb2R1Y3QtbGlzdC10YXgtYW1vdW50LWVycm9yP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14269
-
-

15 years 9 months ago [\#5303](#5303) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Order Product List tax amount error](/forum/3-bug-report/5302-order-product-list-tax-amount-error#5303 "I was getting a strange rounding error in the product list of the administration / sales / order screen.  Was not sure if it was something I had done, but after drilling through the stack I think it is due to line 21 in classes/order&#95;product.php where the tax amount is being cast to an integer in method save().  Removing the (int) cast appears to resolve the issue.")*

Thanks for the feedback.

We will fix that on our end as well. Actually, like for the price, you should use Code:

$this-&gt;database-&gt;Quote($product-&gt;order_product_tax);

to be sure that you'll never get a SQL injection in the query.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC81MzAyLW9yZGVyLXByb2R1Y3QtbGlzdC10YXgtYW1vdW50LWVycm9yP3RtcGw9bWFya2Rvd24=) 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.193 seconds

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

[](#top)
