in reply to Template toolkit Adding Values to Variable
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Template toolkit Adding Values to Variable
by seekperlwisdom (Acolyte) on Mar 01, 2010 at 12:32 UTC |