Author |
Topic |
|
barnet
Starting Member
New Zealand
18 Posts |
Posted - May 12 2002 : 23:44:12
|
Hi
Does anyone know how to setup vpasp to alternate row cell colors when displaying products in the default row by row setting.
I am using vpasp4 with all the trimmings
BarNet Internet http://www.barnet.co.nz |
|
lcaseydc
VP-CART New User
USA
90 Posts |
Posted - January 15 2003 : 17:11:13
|
This code does not work....Here is the error:
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/store/shop$colors.asp, line 56
const ProdRowAlt="tr bgcolor='#FFFFFF'> ---------------------------------------^
|
|
|
lcaseydc
VP-CART New User
USA
90 Posts |
Posted - January 15 2003 : 21:44:11
|
I fixed the above error by adding a " after #FFFFFF'>
but now i receive this error when displaying products:
Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'ProdRowColor'
/store/shopproductformat.asp, line 20 Has anyone got this code to work?
|
|
|
lcaseydc
VP-CART New User
USA
90 Posts |
Posted - January 15 2003 : 21:59:17
|
I am also getting this error:
Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'xProductSelect'
/store/shopproductformat.asp, line 24
|
|
|
Superal
VP-CART Expert
Canada
542 Posts |
Posted - January 16 2003 : 02:02:51
|
The variable ProdRowColor is undefined anywhere. Dim ProdRowColor. As the post stated "so don`t forget the dim statement". Barnet should have put it into the code. Should be getconfig("xproductselect")
|
|
|
lcaseydc
VP-CART New User
USA
90 Posts |
Posted - March 31 2003 : 02:03:56
|
Ok I got this working, But I have a question...
Why does this only work with the multiple product select Option?
Is it possible to make this work without using the multiple product select option?
Thanks
|
|
|
support
Administrator
4679 Posts |
Posted - March 31 2003 : 02:43:43
|
Add these lines to the bottom of shopproductformat.asp The prodrow1 and prodrow2 are the colors
Sub Generatecolor const prodrow1="<tr bgcolor='FFFFFF'>" const prodrow2="<tr bgcolor='CCCCCC'>" dim temprow if pcounter="" then pcounter=0 pcounter=pcounter+1 if (pcounter mod 2)then tempRow=ProdRow1 else tempRow=ProdRow2 end if response.write temprow end sub
Add This line to the very top <% dim pcounter
Replace this line Response.write ProdRow near the top
with this line Generatecolor
Howard Kadetz VP-ASP
|
|
|
ironhawker
VP-CART Super User
USA
260 Posts |
Posted - June 10 2008 : 02:08:39
|
So this may have worked in 2002, but I have attempted in VPasp 6.502 (2008)and it doesnt seem to grab.
Is there a newer version of the Generatecolor sub? |
|
|
ironhawker
VP-CART Super User
USA
260 Posts |
|
ironhawker
VP-CART Super User
USA
260 Posts |
Posted - September 09 2009 : 18:55:40
|
Thanks Howard The answer is.... xproductwithhtml set to NO if not using temlates and in shop$colors.asp change the prodnamecolumn, proddescriptioncolumn, prodquantitycolumn, prodpricecolumn, prodbuttoncolumn to be commented OUT
---- if you wish to use templates, Like ME then shopproductformat_template.asp gets the codes / treatement above and sproductwithhtml can be set to yes. Tip: dim pcounter goes below Sub HtmlProductFormatRow
~-~-~-~-~-~-~-~-~-~ Randy "RC" Corn Institute for Higher Learning [email protected] http://www.ironhawker.com 425-828-0738 |
|
|
|
Topic |
|