[ic] [item-subtotal] in array lists

Mike Heins mike at perusion.com
Wed Jun 3 13:23:01 UTC 2009

Quoting Mike Heins (mike at perusion.com):
> Quoting Stefan Hornburg (Racke) (racke at linuxia.de):
> > Hello,
> > 
> > Is there a reason that [item-subtotal] doesn't work in array lists like
> > 
> > [query sql="select sku,quantity from cart_products where cart = 2009" list=1]
> > ...
> > [/query]
> > 
> > It appears to be an omission which should be fixed in Interpolate.pm.
> > 
> Why? There is no cart item to subtotal. Now if you decided to allow
> cart items to be arrays as well as hashes,

....you could do it. But all of the price calculations depend on
hashes and attributes. Would you coerce the hash?

> I think it would be as useful to have [item-math quantity * subtotal].

In SQL of course it is better to use its capabilities.

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.328.4479  <mike at perusion.com>

An amateur practices until he gets it right. A pro
practices until he can't get it wrong. -- unknown

More information about the interchange-users mailing list