Put simply, I need to have pricing accurate to 5 (possibly even 6) digits of precision.
I have come across some generic modules that allow the precision to be 4 digits. Going further, I of course discovered that the MySQL fields are defined as
Unfortunately, I require 5-6 places of precision. The pricing formula is simple:
QUANTITY = WIDTH * HEIGHT (for area based) QUANTITY = LENGTH (for linear based) TOTALPRICE = QUANTITY * ITEMPRICE + BASE COST
Item prices need to be stored similar to
Given the limitations of Magento, it seems I am faced with a few options.
- Hack the core to allow additional precision, including changing the MySQL fields to
- Add a new text field attribute that won't care about decimal precision and use that for prices instead of the default price field (I'm guessing through an observer).
Given the requirement that prices need to be stored with 5-6 digits of precision, what method might you suggest?