Have you checked what is in information.QTY and information.PRICE? Or perhaps shopping is zero or empty or undef and the loop doesn't run?
Does TT know the += operator (as in [% totalprice += ff %]? Have you tried [% totalprice = totalprice + ff %]? (Sorry, I cannot check on the computer I am writing this on).
Update: Added question on += operator
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In reply to Re: Template toolkit Adding Values to Variable
by CountZero
in thread Template toolkit Adding Values to Variable
by seekperlwisdom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |