View Single Post
  #6  
Old 05-08-2014, 08:48 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: integer math in a smarty template

Oh, you are trying to assign a variable I believe.
Try just using {$ItemOrderby - $p.orderby} that should print the value you are looking for essentially doing the math and rendering the result.

If you need to assign the result to a new variable:
{assign var=running_total value=$running_total+$some_array[$row].some_value}
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote