Author |
Topic |
|
fraser
Starting Member
Canada
37 Posts |
Posted - January 08 2003 : 20:49:32
|
Using my product template how would I show a sale price in red text as seen below? $129.00 Sale Price: $97.00 (in bold red) If I make [cprice] red than all of my prices will show up red even if they are not on sale. http://www.kineticfountains.com has been able to do this with VPASP.
I have the code started but I am getting an error: Variable is undefined: 'rs'
This is what I have so far:
Case "SPECIALFORMATCURRENCY" If NOT isNull(RS("RetailPrice")) AND RS("RetailPrice")<>"" then value = "<font size=2 face=Arial><B>RetailPrice: " & shopformatcurrency(RS("RetailPrice"),getconfig("xdecimalpoint")) &"</font><br><font size=2 face=Arial color=red><B>Sale Price: " & shopformatcurrency(value,getconfig("xdecimalpoint")) & "</font>" Else value = "<font size=2 face=Arial><B>" & shopformatcurrency(value,getconfig("xdecimalpoint")) & "</font>" End if
I would appreciate any help on this one! Thanks!
|
|
fraser
Starting Member
Canada
37 Posts |
Posted - January 09 2003 : 18:56:17
|
Thanks to Graham from support! Here is the solution:
Case "SPECIALFORMATCURRENCY" If NOT isNull(tmpRS("RetailPrice")) AND tmpRS("RetailPrice")<>"" then value = "<font size=2 face=Arial><B>RetailPrice: " & shopformatcurrency(tmpRS("RetailPrice"),getconfig("xdecimalpoint")) &"</font><br><font size=2 face=Arial color=red><B>Sale Price: " & shopformatcurrency(value,getconfig("xdecimalpoint")) & "</font>" Else value = "<font size=2 face=Arial><B>" & shopformatcurrency(value,getconfig("xdecimalpoint")) & "</font>" End if
|
|
|
sab
Starting Member
3 Posts |
Posted - February 25 2005 : 05:20:22
|
Hi,
Which file I should edit to get the sale price turns red.
|
|
|
support
Administrator
4679 Posts |
Posted - February 27 2005 : 13:09:12
|
Hi,
You would need to edit approximately line 245 in shopproductformat.asp
VP-ASP Support |
|
|
atari
Starting Member
30 Posts |
Posted - March 03 2005 : 17:21:23
|
I don't understand why you guys are changing code to make the font color change, that seems to me to be very poor coding practise. in 2 years when you forget that code change, and no longer want the sale price to be red, how are you going to remember what code you changed?
the proper way to do it is to have your product display template modify the color <span class="redNote"> [formatcurrency cprice] </span>
now it's simple, color and font is controled by the stylesheet (as it should be) and this is obvioius and easy to change in the years to come.
|
|
|
|
Topic |
|