price without decimals
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
price without decimals
Hi!
Is there any way to configure in one place to use price without decimals? e.g. 1000 usd
Is there any way to configure in one place to use price without decimals? e.g. 1000 usd
Re: price without decimals
You can set the price precision using:
More info:
https://github.com/aimeos/aimeos-core/b ... #L183-L194
See also:
https://aimeos.org/docs/latest/laravel/ ... figuration
Code: Select all
mshop/price/manager/precision => 0
https://github.com/aimeos/aimeos-core/b ... #L183-L194
See also:
https://aimeos.org/docs/latest/laravel/ ... figuration
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: price without decimals
Thanks!
A small note.
My version of aimeos-core/lib/mshoplib/src/MShop/Price/Manager/Standard.php has a little bit different config string:
$this->precision = $context->getConfig()->get( 'mshop/price/precision', 2 ); (not 'mshop/price/manager/precision'): see attach.
So when I update the core I will loose this config. Probably it would be good either do not change config strings in future versions or make some kind of compatibility.
A small note.
My version of aimeos-core/lib/mshoplib/src/MShop/Price/Manager/Standard.php has a little bit different config string:
$this->precision = $context->getConfig()->get( 'mshop/price/precision', 2 ); (not 'mshop/price/manager/precision'): see attach.
So when I update the core I will loose this config. Probably it would be good either do not change config strings in future versions or make some kind of compatibility.
- Attachments
-
- Screenshot_27.jpg (32.12 KiB) Viewed 1027 times