Sale Price - Expressions
([OnSale] == 'Y')?('<s>'.number_format([Price],2,'.',',').'</s>'.number_format([SalePrice],2,'.',',')):number_format([Price],2,'.',',')
I found the above on another thread and it made me wonder if I could change how I add the sale price.
I currently put this calculation on the page itself and when the user clicks Add To Cart, the page self-links and the calculation is determined by what session variable was activated.
So, on top of the page I use this if statement:
If Request.Form("Discount") = "0" then %>
<%Session("ItemPrice") = Request.Form("BasePrice")%>
<% End if %>
If Request.Form("Discount") = "1" then%>
<%Session("ItemPrice") = Request.Form("SalePrice")%>
If it's discounted, it sets the "ItemPrice to the the price from SalePrice hidden form field and if it's not, it comes from the BasePrice field.
What I'm trying to do is get rid of this on the page and have it do this in the "Calculation" tab.
What would be the equivalent Calculation in VBscript be like that would accomplish the same thing as I have for the "Session Variable method" on the page itself?