Hi,
I built a system a while ago that gets the rrp and price and then using this information gives you a how much you save and percentage, now I use this on all our sites and it seems to work perfectly however using the same code ive used on all our actinic sites it seems to give me an error on this one site :s. however it looks fine once I preview on website here is my code:
what is odd is as soon as I replace the variable Product RRP with the number that I am inputting into the variable the error goes away meaning it is somthing to do with this variable :s
Simon
I built a system a while ago that gets the rrp and price and then using this information gives you a how much you save and percentage, now I use this on all our sites and it seems to work perfectly however using the same code ive used on all our actinic sites it seems to give me an error on this one site :s. however it looks fine once I preview on website here is my code:
Code:
<actinic:block php="true" > $rrp = <actinic:variable name="Product RRP" selectable="false" />; $rawprice = <actinic:variable name="ProductPriceRaw" selectable="false" />; { $amountsaved = ($rrp - $rawprice); $savepercent = ((($rrp - $rawprice) / $rrp) * 100); echo "you save £$amountsaved"; echo " (".number_format($savepercent,1); echo "%)"; } </actinic:block>
Simon
Comment