Announcement

Collapse
No announcement yet.

RRP in Swift - A Bug and Two Mods

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    RRP in Swift - A Bug and Two Mods

    Sellerdeck Swift Template has a nifty RRP script built into the Dynamic Price Layout (Product Page) and the Standard Tax Inclusive and Standard Tax Exclusive Price Layouts {Product Summary).

    There is a bug (MS_SMDEV-4056) that needs correcting which in certain Component combinations will display the RRP as 1.0, or 2.0 or 3.0.

    This is what is currently at around line 75 in the Dynamic Price layout:
    Code:
    echo "<h5 class='rrp'>RRP <s>£".number_format((float)$rrpFormatted , 2, '.', '')."</s> You Save ".$savepercent."%</h5>";
    You need to change this to:
    Code:
    echo "<h5 class='rrp'>RRP <s>£".$rrpFormatted."</s> You Save ".$savepercent."%</h5>";
    If you wish to show the amount saved in pounds rather than percent make this edit:
    Code:
    if ( ($rrp != 0) && ($rrp > $rawprice) )
    {
    $savepercent = round((($rrp - $rawprice) / $rrp) * 100);
    $savedorrars = round($rrp - $rawprice);
    $rrpFormatted = number_format(($rrp),2);
    //echo "<h5 class='rrp'>RRP<s>£".$rrpFormatted."</s> You Save ".$savepercent."%</h5>";
    echo "<h5 class='rrp'>RRP <s>£".$rrpFormatted."</s> You Save £".$savedorrars."</h5>";
    }
    If you enter tax exclusive prices in the catalog but you enter the RRP as tax inclusive comment out this line (//$rrp):
    Code:
     <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsTaxInclusiveMode%22%20%2f%3e" >
    if($g_bShowDynamicTaxInclusivePrice)
    {
    //$rrp += (<actinic:variable name="TaxRate1" /> / 100) * $rrp;
    $rawprice += (<actinic:variable name="TaxRate1" /> / 100) * $rawprice;
    }
    </actinic:block>
    All without warranty.
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk
Working...
X