VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 CODE: You saved this much
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hakkatil
VP-ASP New User

109 Posts

Posted - August 30 2002 :  18:17:47  Show Profile  Reply with Quote
Someone asked for this code but i cant find it. Anyway here it is.

This piece of code displays "You Save: $12.55" and puts strikes on retail price.Ex:

$24.55
Retail Price: $69.55
You save: $45.00

Open shopproductformat.asp
then find these lines around 243 under Sub FormatPrice

if strRetailPrice> 0 then
response.write ProdRetailPriceStart & LangProductRetailPrice & shopformatcurrency(strRetailPrice,decimalpoint)
end if

replace it with this one

if strRetailPrice> 0 then
response.write ProdRetailPriceStart & LangProductRetailPrice & "<strike>" & shopformatcurrency(strRetailPrice,decimalpoint) & "</strike>"
yousave=strRetailPrice-strPrice
response.write "<BR>" &"<font color=red>You save: </font>" & shopformatcurrency(yousave,decimalpoint) & ProdRetailPriceEnd
end if

lastly, define yousave inside the sub

Ex: dim yousave

Note: Make sure that Retail Price is bigger than discounted price.

HAKAN

Edited by - hakkatil on August 30 2002 18:21:31

greatphoto
VP-ASP Super User

USA
304 Posts

Posted - June 26 2005 :  21:22:20  Show Profile  Reply with Quote
Nice post. Just wanted to give an update on this. I just tried this out, and once I was in the code, I found there is something similar already there in version 5.50! Its based on the xproductdisplaysaving config. If this is set to yes, then a discount amount will be shown.

Only problem for me is that I'm using product templates, and my templates don't call this subroutine. For doing this with templates, this topic is useful reading:
http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=2301



Edited by - greatphoto on June 26 2005 22:48:52
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000