Hi guys,
I struggled the the title for this sorry, the code below (asuming I've cut the right part) displays the following:
RRP: £215 Our Price: £172 Inc. VAT
You Save 20% while offer lasts!
£172.00 (Including VAT at 20%)
but will only ever display 1 figure after the decimal point, could someone tell me why?
Thanks guys
<actinic:block php="true" >
$rrp = <actinic:variable name="RRP" selectable="false" />;
$rawprice = (((<actinic:variable name="ProductPriceRaw" selectable="false" />) /100)* 120);
{
$saving = ((($rrp - $rawprice) / $rrp) * 100);
echo "Our Price: £";
echo round(((("<actinic:variable name="ProductPriceRaw" selectable="false" />")/100) * 120) ,2);
echo " Inc. VAT";
echo "<br />You Save ".number_format($saving,0)."% while offer lasts!";
}
</actinic:block>
I struggled the the title for this sorry, the code below (asuming I've cut the right part) displays the following:
RRP: £215 Our Price: £172 Inc. VAT
You Save 20% while offer lasts!
£172.00 (Including VAT at 20%)
but will only ever display 1 figure after the decimal point, could someone tell me why?
Thanks guys
<actinic:block php="true" >
$rrp = <actinic:variable name="RRP" selectable="false" />;
$rawprice = (((<actinic:variable name="ProductPriceRaw" selectable="false" />) /100)* 120);
{
$saving = ((($rrp - $rawprice) / $rrp) * 100);
echo "Our Price: £";
echo round(((("<actinic:variable name="ProductPriceRaw" selectable="false" />")/100) * 120) ,2);
echo " Inc. VAT";
echo "<br />You Save ".number_format($saving,0)."% while offer lasts!";
}
</actinic:block>
Comment