View Single Post
  #8  
Old 05-17-2004, 06:17 AM
 
richard_o richard_o is offline
 

Member
  
Join Date: Apr 2004
Posts: 24
 

Default

Quote:
You need it to be of that form which was stated above.
You have to assign the variables for the math equation for smarty to use them.

Unfortunately, using the snippet below (which I agree, looks like it should work fine) doesn't.

Quote:
{math equation="(sub_total+discount+shipping_cost)*0.02"
sub_total=$cart.sub_total
discount=$cart.discount
shipping_cost=$cart.shipping_cost
assign="surcharge"
format="%.2f"}


And it gives me this error message

Quote:
Warning: Smarty error: math: parameter sub not passed as argument

A real head-scratcher...
Reply With Quote