Hiding a retail price for items that are not on sale

Updated on 20-October-2016 at 10:16 AM

Business Catalyst End of life announcement - find out more details.

Add the following script to the large or small products layout for an online store:

<script language="javascript"><!--  
var onsale_{tag_productid} = "{tag_onsale}";  
if (onsale_{tag_productid} == "0") {  
     document.getElementById("rrpprice_{tag_productid}").style.display = &#39;none&#39;;   

Then you would assign the following tag ID to a retail price tag

<div id="rrpprice_{tag_productid}">{tag_retailprice}</div>