May 17, 2012

pricing II

Filed under: ZenMagick — DerManoMann @ 10:01 am

I am very close to having the new pricing code pass all shopping cart tests. In fact, one benefit of this change is that for the first time it is possible to run a complete cart test over all products in one go.

The stats for that look something like this:
Client IP: 127.0.0.1;   PHP: 5.3.10;   ZenMagick: ${zenmagick.version};   environment: prod;   total page execution: 31.5726 secconds;
databases: zmdev(ZMDatabase): SQL queries: 23325, duration: 19.6571 seconds;
includes: 526;   memory: 63176704

Right now I do have one test randomly failing. The attributes are randomly populated (select, radio and text), so it takes a bit to log what is actually breaking things.
Still, this is a major improvement and means that ZenMagick contains all relevant pricing code – and all of that only once!
Since the checkout order instance is already populated from the shopping cart, all data is derived from a single set of business logic – yay!

Another bonus is that the shopping cart now is populated just from a simple array containing product id, quantity and attribute details of the products in the cart. In fact, this is the same data zen-cart uses.
This also means that we now can start tracking cart actions separate from zen-cart (and verify that they match). The ultimate consequence of that is native cart actions that just use ZenMagick code rather than the zen-cart cart instance internally.

Still some way to go, but a big step, nevertheless.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.