- Posts: 3
- Thank you received: 0
product price restriction decimal limit
5 years 7 months ago #331672
by oiiahchai
product price restriction decimal limit was created by oiiahchai
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.3
Hello, I need help how to set the product price restriction with more then 5 decimal ? Example 0.00001 is work fine, 0.000001 will become 0.
Thank you.
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.3
Hello, I need help how to set the product price restriction with more then 5 decimal ? Example 0.00001 is work fine, 0.000001 will become 0.
Thank you.
Please Log in or Create an account to join the conversation.
5 years 7 months ago #331675
by nicolas
Replied by nicolas on topic product price restriction decimal limit
Hi,
Prices indeed only support 5 decimals by default.
To change that, you'll have to edit the table hikashop_price via your PHPMyAdmin and edit the options of the "price_value" column to change the number of decimals:
www.tutorialspoint.com/how-to-specify-de...ase-using-phpmyadmin
Also, note that in the settings of your currency, you can configure the number of decimals which will be applied when displaying prices in that currency. So I also recommend you to check the number of decimals setting of your currency in the menu System>Currencies.
Prices indeed only support 5 decimals by default.
To change that, you'll have to edit the table hikashop_price via your PHPMyAdmin and edit the options of the "price_value" column to change the number of decimals:
www.tutorialspoint.com/how-to-specify-de...ase-using-phpmyadmin
Also, note that in the settings of your currency, you can configure the number of decimals which will be applied when displaying prices in that currency. So I also recommend you to check the number of decimals setting of your currency in the menu System>Currencies.
The following user(s) said Thank You: oiiahchai
Please Log in or Create an account to join the conversation.
5 years 7 months ago #332086
by oiiahchai
Replied by oiiahchai on topic product price restriction decimal limit
Please Log in or Create an account to join the conversation.
5 years 6 months ago #332435
by oiiahchai
Replied by oiiahchai on topic product price restriction decimal limit
Please Log in or Create an account to join the conversation.
5 years 6 months ago #332442
by nicolas
Replied by nicolas on topic product price restriction decimal limit
Hi,
Yes. That comes from the number of decimal setting of your currency.
This defines how many decimals you want to use for the display of the prices. Since you configured 10 in there, you'll get 10 decimals for all the prices.
There is no easy way to make the display of the number of decimals dynamic based on each price. That would require some complex code to be written in the file administrator/components/com_hikashop/classes/currency.php in the format function to dynamically adapt the number of decimals based on the trailing zeros.
Yes. That comes from the number of decimal setting of your currency.
This defines how many decimals you want to use for the display of the prices. Since you configured 10 in there, you'll get 10 decimals for all the prices.
There is no easy way to make the display of the number of decimals dynamic based on each price. That would require some complex code to be written in the file administrator/components/com_hikashop/classes/currency.php in the format function to dynamically adapt the number of decimals based on the trailing zeros.
Please Log in or Create an account to join the conversation.
Time to create page: 0.069 seconds