- Posts: 37
- Thank you received: 3
limit the display of number digits in the price
10 years 4 months ago #239451
by Ilya.bps
limit the display of number digits in the price was created by Ilya.bps
Please Log in or Create an account to join the conversation.
10 years 4 months ago #239454
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic limit the display of number digits in the price
Hi,
HikaShop have a limitation of 5 digits for the prices.
In HikaMarket you can set limitations for the vendor about the minimum price and the maximum price but you can't influence the number of digits.
If you have some taxes, the price with tax will be generally a rounded one, but the price without tax could have several digits and in that case, having 5 digits is essential.
You can see to customize the product edition view for the price edition part.
In your customization, you can see to remove the extra "0" digits (by converting the string into a float).
Regards,
HikaShop have a limitation of 5 digits for the prices.
In HikaMarket you can set limitations for the vendor about the minimum price and the maximum price but you can't influence the number of digits.
If you have some taxes, the price with tax will be generally a rounded one, but the price without tax could have several digits and in that case, having 5 digits is essential.
You can see to customize the product edition view for the price edition part.
In your customization, you can see to remove the extra "0" digits (by converting the string into a float).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
10 years 4 months ago #239496
by Ilya.bps
Replied by Ilya.bps on topic limit the display of number digits in the price
Thank you Jerome,
I do not understand how I savsem remove extra display 5 digits
I do not understand how I savsem remove extra display 5 digits
Please Log in or Create an account to join the conversation.
10 years 4 months ago #239513
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic limit the display of number digits in the price
Hi,
It's hard to give you a precise answer because depending your ACL configuration ; it could affect different parts in the view "productmarket / form_price".
But the idea is to display a number instead of a string.
Like in the view, you can find the display of the price value
And you can convert it into a float number before the display
And the extra digits won't be display.
Regards,
It's hard to give you a precise answer because depending your ACL configuration ; it could affect different parts in the view "productmarket / form_price".
But the idea is to display a number instead of a string.
Like in the view, you can find the display of the price value
Code:
echo @$price->price_value;
Code:
echo (float)hikamarket::toFloat(@$price->price_value);
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: Ilya.bps
Please Log in or Create an account to join the conversation.
10 years 4 months ago #239680
by Ilya.bps
Replied by Ilya.bps on topic limit the display of number digits in the price
Thanks Jerome.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.179 seconds