Posted on 21/12/2016 09:45:47
Interesting, I see different behavior. I created two new product fields (not category fields), one an Integer, the other a double and assigned them 19 and 19.53 respectively. I then get the following outout in my template:
@product.GetInteger("Ecom:Product:Field.TestInt").ToString("N") // 19.00
@product.GetDouble("Ecom:Product:Field.TestInt").ToString("N") // 19.00
@product.GetString("Ecom:Product:Field.TestInt") //19
@product.GetInteger("Ecom:Product:Field.TestDouble").ToString("N") // 0.00
@product.GetDouble("Ecom:Product:Field.TestDouble").ToString("N") // 19.53
@product.GetString("Ecom:Product:Field.TestDouble") //19.53
The double to integer conversion resulting in zero is a little odd but other than that I think this looks like what you'd expect.
Is this what you have as well? If not, can you describe your fields, and template a bit more?