View Single Post
  #3  
Old 05-17-2004, 05:23 AM
 
richard_o richard_o is offline
 

Member
  
Join Date: Apr 2004
Posts: 24
 

Default

Thanks for the reply. It *almost* works - i.e. I can use the math function with known values, but cannot use smarty variables.

For example,

{math equation="4+5"
assign="surcharge"
format="%.2f"} {$surcharge}

produces '9.00' (correctly)

but

{math equation="sub_total+4" sub_total=$cart.sub_total
assign="surcharge"
format="%.2f"} {$surcharge}

yields the following error:

Warning: Smarty error: math: parameter Array not passed as argument

I might go and have another look at the smarty web site to see if any similar problems have arisen...
Reply With Quote