{"id":666,"date":"2020-10-01T09:14:33","date_gmt":"2020-10-01T08:14:33","guid":{"rendered":"https:\/\/www.graphicz.co.uk\/blog\/?p=666"},"modified":"2020-10-01T09:14:35","modified_gmt":"2020-10-01T08:14:35","slug":"rrp-in-sellerdeck-swift-a-bug-and-two-mods","status":"publish","type":"post","link":"https:\/\/www.graphicz.co.uk\/blog\/rrp-in-sellerdeck-swift-a-bug-and-two-mods\/","title":{"rendered":"RRP in Sellerdeck Swift &#8211; A Bug and Two Mods"},"content":{"rendered":"\n<p>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).<br><br>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.<br><br>This is what is currently at around line 75 in the Dynamic Price layout:<br>Code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"&lt;h5 class='rrp'&gt;RRP &lt;s&gt;\u00a3\".number_format((float)$rrpFormatted , 2, '.', '').\"&lt;\/s&gt; You Save \".$savepercent.\"%&lt;\/h5&gt;\";<\/pre>\n\n\n\n<p>You need to change this to:<br>Code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"&lt;h5 class='rrp'&gt;RRP &lt;s&gt;\u00a3\".$rrpFormatted.\"&lt;\/s&gt; You Save \".$savepercent.\"%&lt;\/h5&gt;\";<\/pre>\n\n\n\n<p>If you wish to show the amount saved in pounds rather than percent make this edit:<br>Code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">if ( ($rrp != 0) &amp;&amp; ($rrp &gt; $rawprice) )\n{\n$savepercent = round((($rrp - $rawprice) \/ $rrp) * 100);\n$savedorrars = round($rrp - $rawprice);\n$rrpFormatted = number_format(($rrp),2);\n\/\/echo \"&lt;h5 class='rrp'&gt;RRP&lt;s&gt;\u00a3\".$rrpFormatted.\"&lt;\/s&gt; You Save \".$savepercent.\"%&lt;\/h5&gt;\";\necho \"&lt;h5 class='rrp'&gt;RRP &lt;s&gt;\u00a3\".$rrpFormatted.\"&lt;\/s&gt; You Save \u00a3\".$savedorrars.\"&lt;\/h5&gt;\";\n}<\/pre>\n\n\n\n<p>If you enter tax exclusive prices in the catalog but you enter the RRP as tax inclusive comment out this line (\/\/$rrp):<br>Code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> &lt;actinic:block if=\"%21%3cactinic%3avariable%20name%3d%22IsTaxInclusiveMode%22%20%2f%3e\" &gt;\nif($g_bShowDynamicTaxInclusivePrice)\n{\n\/\/$rrp += (&lt;actinic:variable name=\"TaxRate1\" \/&gt; \/ 100) * $rrp;\n$rawprice += (&lt;actinic:variable name=\"TaxRate1\" \/&gt; \/ 100) * $rawprice;\n}\n&lt;\/actinic:block&gt;<\/pre>\n\n\n\n<p>All without warranty.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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<span class=\"ellipsis\">&hellip;<\/span> <a href=\"https:\/\/www.graphicz.co.uk\/blog\/rrp-in-sellerdeck-swift-a-bug-and-two-mods\/\"><\/p>\n<div class=\"read-more\"><b>Read more &#8250;<\/b><\/div>\n<p><!-- end of .read-more --><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-666","post","type-post","status-publish","format-standard","hentry","category-graphicz-articles"],"_links":{"self":[{"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/posts\/666"}],"collection":[{"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=666"}],"version-history":[{"count":1,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/posts\/666\/revisions"}],"predecessor-version":[{"id":667,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/posts\/666\/revisions\/667"}],"wp:attachment":[{"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}