Portal | Homepage | Blog

Math Possible with NitroScript Variables?


Is the following possible with the right syntax?:
{product['product_weblinxcustomnumber1'] - product['product_stock']}

Basically, I need to subtract the value of product_stock from product_weblinxcustomnumber1 and “echo” the calculated value…

I’ve tried a couple different ways and have not been able to perform any math calculations… Is this possible?


Hi Derek,

The best way to do that would be to calculate the correct amount in the mappings itself.

For example you could create another weblinxcustomnumber that would contain:


And then output that custom field on the webstore.




Gotcha. It would be really cool if we could do math with these variables. It would allow use to spare those precious few custom mappings!

Thank you for the info :slight_smile: