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...
|