Try as I may and following the KB and 'Sellerdeck Help' documentation I am not able to create a calculation for 'You save' in the Filtered Search Results in v18.1.*
The normal dynamic price works well:
But I cannot get the Raw Price or ProductID into the Search Result Layout to do the calculation.
An earlier solution for v2013 no longer works in this current version.
Is there a way to calculate the difference between RawPrice and RRP and display it in the Search Result Layout?
Thank you...
The normal dynamic price works well:
Code:
$rrp<actinic:variable name="ProductID" /> = <actinic:variable name="RRP" />;
$rawprice<actinic:variable name="ProductID" /> = <actinic:variable name="ProductPriceRaw" selectable="false" />;
<actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsTaxInclusiveMode%22%20%2f%3e" >
if($g_bShowDynamicTaxInclusivePrice)
{
$rrp<actinic:variable name="ProductID" /> += (<actinic:variable name="TaxRate1" /> / 100) * $rrp<actinic:variable name="ProductID" />;
$rawprice<actinic:variable name="ProductID" /> += (<actinic:variable name="TaxRate1" /> / 100) * $rawprice<actinic:variable name="ProductID" />;
}
</actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsTaxInclusiveMode%22%20%2f%3e" >
if(!$g_bShowDynamicTaxInclusivePrice)
{
$rrp<actinic:variable name="ProductID" /> = $rrp<actinic:variable name="ProductID" /> / ((<actinic:variable name="TaxRate1" /> + 100) / 100);
$rawprice<actinic:variable name="ProductID" /> = $rawprice<actinic:variable name="ProductID" /> / ((<actinic:variable name="TaxRate1" /> + 100) / 100);
}
</actinic:block>
// only display if we have an RRP and there's a saving to show
if ( ($rrp != 0) && ($rrp > $rawprice) )
{
$savepercent<actinic:variable name="ProductID" /> = round((($rrp<actinic:variable name="ProductID" /> - $rawprice<actinic:variable name="ProductID" />) / $rrp) * 100);
$savehowmuch<actinic:variable name="ProductID" /> = round($rrp<actinic:variable name="ProductID" /> - $rawprice<actinic:variable name="ProductID" />);
echo "<h5 class='rrp'>RRP <s>".number_format((float)$rrp<actinic:variable name="ProductID" /> , 2, '.', '')."</s> You Save ".$savepercent<actinic:variable name="ProductID" />."%</h5>";
echo "<h5 class='rrp'>RRP <s>".number_format((float)$rrp<actinic:variable name="ProductID" /> , 2, '.', '')."</s> You Save £".$savehowmuch<actinic:variable name="ProductID" />."</h5>";
}
An earlier solution for v2013 no longer works in this current version.
Is there a way to calculate the difference between RawPrice and RRP and display it in the Search Result Layout?
Thank you...

Comment