I have modified a layout using Normans ‘Automatically Calculate Savings based on an RRP’ - AUG V9 (P71) with slight variations;
------------------------------------------------------------------------------------------------------------
<actinic:block php="true">
$rrp = <actinic:variable name="RRP" selectable="false" />;
$rawprice = <actinic:variable name="ProductPriceRaw" selectable="false" />;
// only display if 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 - Save $savepercent%)";
}
</actinic:block>
--------------------------------------------------------------------------------------------------------------
I am having a problem with the displayed RRP price as follows;
Entered in variable 20.99 – Displayed £20.99
Entered in variable 20.90 – Displayed £20.9
Entered in variable 20.00 – Displayed £20
When you enter the RRP value for the product as 20.90 and then go back to it after applying it, the trailing 0 has been removed so I suspect it is a database setting.
The variable has ‘Number’ selected and ‘Whole Numbers Only’ un-checked.
Can anyone offer some advice?
Thanks
Colin
------------------------------------------------------------------------------------------------------------
<actinic:block php="true">
$rrp = <actinic:variable name="RRP" selectable="false" />;
$rawprice = <actinic:variable name="ProductPriceRaw" selectable="false" />;
// only display if 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 - Save $savepercent%)";
}
</actinic:block>
--------------------------------------------------------------------------------------------------------------
I am having a problem with the displayed RRP price as follows;
Entered in variable 20.99 – Displayed £20.99
Entered in variable 20.90 – Displayed £20.9
Entered in variable 20.00 – Displayed £20
When you enter the RRP value for the product as 20.90 and then go back to it after applying it, the trailing 0 has been removed so I suspect it is a database setting.
The variable has ‘Number’ selected and ‘Whole Numbers Only’ un-checked.
Can anyone offer some advice?
Thanks
Colin
Comment