re-evaluating price related plugins
While refactoring existing plugins I’ve taken the time to think about which ones to keep and which ones to drop (for now? ever?). Right now I am looking at the dual pricing and the price group plugins.
Two thoughts:
- The price group plugin should be moved into storefront. There are two good reasons for this. First of all, it would mean not having to subclass ZMProducts. Secondly, it is useful and opens the door for more improvements in that area.
- #1 actually means that the dual pricing plugin is more or less obsolete.
Opinions?

Just recently I work on some thing related to zencart’s price functions and notice many ugly things:
1. Many price functions also include html code inside….
2. round() was used more than necessary, the final price can be the result of multiple round(). I think we should round up or down only at the very last step before we print out the price.
Comment by Raine — December 15, 2009 @ 8:01 am
Yes. ZenMagick isn’t using any of the zen cart functions (unless where no replacement exists to avoid different results). Also, the code uses a lot less database queries.
One area I noticed is zencart’s modules. For example order totals are calculating tax individually and update totals! Right now the ZenMagick order total code isn’t that great either, though. However, I think the interfaces could change just a bit so plugins just return numbers pre tax and leave it to the calling code to sort out totals, tax, etc
Comment by DerManoMann — December 15, 2009 @ 11:02 am