Because of business logic I need to round all product prices to the nearest thousand.
Example:
If i have a price of $18600 i need to change the price to $19000. If i have $18400 i need to change it to $18000.
I've played with setDisplayValue($value)
and getDisplayValue()
methods from Magento_Framework/Pricing/Render/Amount.php
but this does not change the price in all the store.
What file(s) should i modify to affect the behavior in all the store?
Thanks,
A. Martz.
Best Answer
I have modified a method convert of file Magento\Directory\Model\Currency.
declaring a plugin, file Vendor/Module/etc/di.xml
plugin model, file Vendor/Module/Model/Plugin/Currency.php
Also see Complete code on GitHub