Skip to main content

limit the display of number digits in the price

More
10 years 4 months ago #239451 by Ilya.bps
-- HikaShop version -- : 2.6.3
-- HikaMarket version -- : 1.7.0

Hello,
how can I limit the display of number digits in the price in the front vendor panel?

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

More
10 years 4 months ago #239454 by Jerome
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,

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

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

More
10 years 4 months ago #239496 by Ilya.bps
Thank you Jerome,
I do not understand how I savsem remove extra display 5 digits

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

More
10 years 4 months ago #239513 by Jerome
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
Code:
echo @$price->price_value;
And you can convert it into a float number before the display
Code:
echo (float)hikamarket::toFloat(@$price->price_value);
And the extra digits won't be display.

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.

More
10 years 4 months ago #239680 by Ilya.bps
Thanks Jerome.

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

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