I had to make multiple changes to get this to work. So many changes in fact, that i can’t post it here (see attachment instead).
A little background.... My company makes small plastic caps and other plastic items. Some of the items are individually priced at less than a penny. I therefore needed the ability to price individual items with 4-decimal place pricing. But I didn’t want this to affect all prices globally, because I want all the totals/subtotals get rounded to normal 2-decimal place dollar amounts.
I did this my adding a “$precision” parameter to several functions, defaulting this parameter to “2”, and by passing a value of “4” wherever I needed 4-decimal place prices.
The attached changes are my “work-in-progress” and have not yet been tested in a production environment, so there are doubtless other changes I’ll need to make before we put our site live.
I’d really rather turn these changes into a standard magneto mod, but I’m having problems because some of the classes I need to extend have already been extended by some of the other mods I’ve already installed (Drop-down-quantity mod (DDQ), Simple Configurable Products (SCP) ). Magneto does not allow you to extended the same class twice, so I’m running into conflicts with these other mods. After my site goes live I might have the time to go back and address these issues. But for right now, I have a deadline to meet.