Hi All,
Hopefully quite a simple question here:
Are there any mathematical functions available in Actinic (Business V8)?
I'm trying to display the shipping weight in the product description, but would like values under 1kg to display as xx g rather than 0.xx kg, so I need to multiply the value by 1000.
I have the following code done already:
Basically testing for >=1 or <1 and adding the correct suffix. But I need to return ShippingWeight*1000 before the 'g'. Will I need a wee javascript code to do this?
This may seem like a tiny detail, but thinking longer term I'd like to develop a similar routine to convert back to imperial measurements as quite a lot of customers still ask for this.
Thanks in advance,
Murray
Hopefully quite a simple question here:
Are there any mathematical functions available in Actinic (Business V8)?
I'm trying to display the shipping weight in the product description, but would like values under 1kg to display as xx g rather than 0.xx kg, so I need to multiply the value by 1000.
I have the following code done already:
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22ShippingWeight%22%20%2f%3e%20%20%3c%201"> g </actinic:block> <actinic:block if="%3cactinic%3avariable%20name%3d%22ShippingWeight%22%20%2f%3e%20%20%3e%3d%201"> <actinic:variable name="ShippingWeight" /> kg </actinic:block>
This may seem like a tiny detail, but thinking longer term I'd like to develop a similar routine to convert back to imperial measurements as quite a lot of customers still ask for this.
Thanks in advance,
Murray
Comment