Hi all,
I currently use a piece of code in some of my item descriptions to compare the sale price of a product to an RRP (a variable i've set up)
The code i use is:
<actinic:block php="true" selectable="false">
$rrp = [RRP];
$rawprice = [ProductPriceRaw];
$rawprice = $rawprice * 1.175; // add in vat if showing VAT inc prices
// only display is we have an RRP and there's a saving to show
if ( ($rrp != 0) && ($rrp > $rawprice) )
{
$savepercent = round((($rrp - $rawprice) / $rrp) * 100);
echo "RRP £$rrp - you save $savepercent%";
}
</actinic:block>
What i want to do, is to have this for each product but not in my description box.
When i try putting it in within the design section to a layout code it tells me i have a parce error. What am i doing wrong, or is this not possible?
Thanks for your help in advance
Graeme
I currently use a piece of code in some of my item descriptions to compare the sale price of a product to an RRP (a variable i've set up)
The code i use is:
<actinic:block php="true" selectable="false">
$rrp = [RRP];
$rawprice = [ProductPriceRaw];
$rawprice = $rawprice * 1.175; // add in vat if showing VAT inc prices
// only display is we have an RRP and there's a saving to show
if ( ($rrp != 0) && ($rrp > $rawprice) )
{
$savepercent = round((($rrp - $rawprice) / $rrp) * 100);
echo "RRP £$rrp - you save $savepercent%";
}
</actinic:block>
What i want to do, is to have this for each product but not in my description box.
When i try putting it in within the design section to a layout code it tells me i have a parce error. What am i doing wrong, or is this not possible?
Thanks for your help in advance
Graeme
Comment