Created
July 22, 2013 19:13
-
-
Save jagmitg/6056700 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LOCAL("CurrencyID", #INPUT.Currency) | |
#LOCAL("LocalListPrice", #FUNCTION("LISTPRICE", #Object, #CurrencyID, #Shop.TaxModel)) | |
#IF(#DEFINED(#LocalListPrice)) | |
<p class="listing-price">#LocalListPrice[money] #IF(#PriceQuantity != 1)/ #PriceQuantity #OrderUnit.NameOrAlias#ENDIF#IF(#OrderUnit.Alias NE "piece" AND #PriceQuantity == 1)/ #OrderUnit.NameOrAlias#ENDIF #IF(#OriginalPrice > #ListPrice)<script type="text/javascript">var discountFinal=function(firstly,secondly){var totalfirst=secondly-firstly;var totalsecond=totalfirst/secondly;var totalthird=totalsecond*100;if(document.getElementById("discountCode").innerHTML===null){document.getElementById("spanishtwo").innerHTML.replace("%","")}else{document.getElementById("spanish").innerHTML=Math.floor(totalthird/5)*5}};discountFinal(#OriginalPrice,#ListPrice);</script><div id="discountCode" style="display:none;"><span id="spanish"></span><span id="spanishtwo">%</span></div><span class="space-out">RRP: #OriginalPrice[money]#ENDIF</span></p> | |
#ENDIF | |
#ENDLOCAL | |
#ENDLOCAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment