How to make unit price to be only 2 decimal point

  • Posts: 14
  • Thank you received: 1
5 years 8 months ago #304340

-- HikaShop version -- : 4.0.2
-- HikaMarket version -- : 3.0.0
-- Joomla version -- : 3.8.13
-- PHP version -- : 5.6.0
-- Browser(s) name and version -- : Chrome

Hi,
When I edit product, and then click load product data, the item unit price is automatically set to five decimal point. How to change it to only show 2 decimal point . I already change the Update updateTaxValueFields in order/show.php but it still not working. I change the tofix(2) but still it shows 5 decimal point.

Hope you can help me.

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 8 months ago #304344

Hello,

Prices are loaded directly from the database where HikaShop store them with 5 digits.
There is no option for that ; there is a huge difference with the price which can be displayed rounded and the real prices which are stored in the database.
Just like when you edit a product price in the front-end (or backend), the edition of item prices in the order are with all the possible digits (as in the backend).

Changing that would have unwanted side effects like, impacting existing orders when the price stored in the database do not feet perfectly on 2 digits

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.056 seconds
Powered by Kunena Forum