I am trying to modify our vendor email template to include some extra product template fields that are added to the product. I can access the field ok, but the value is a string. I need to do some calculations on this value and add it to the ExtendedPrice. If I use the value as is, nothing happens, most likely because I am trying to do calculations on a string. So ideally, the string needs to be converted to a float, or LSDecimal as the value is ".05".
I tried something like this:
#set($result=12345)
#set($result=$Float.Parse($found2).ToString())
Where $found2 = ".05"
Nothing happens when I do this, it simply prints the default value of $result.
Is there a way to convert a string to a decimal in NVelocity script?
Thanks.