Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Alternating row colors
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

barnet
Starting Member

New Zealand
18 Posts

Posted - May 12 2002 :  23:44:12  Show Profile  Visit barnet's Homepage  Reply with Quote
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  Show Profile  Reply with Quote
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'>
---------------------------------------^


Go to Top of Page

lcaseydc
VP-CART New User

USA
90 Posts

Posted - January 15 2003 :  21:44:11  Show Profile  Reply with Quote
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?


Go to Top of Page

lcaseydc
VP-CART New User

USA
90 Posts

Posted - January 15 2003 :  21:59:17  Show Profile  Reply with Quote
I am also getting this error:


Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'xProductSelect'

/store/shopproductformat.asp, line 24



Go to Top of Page

Superal
VP-CART Expert

Canada
542 Posts

Posted - January 16 2003 :  02:02:51  Show Profile  Reply with Quote
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")

Go to Top of Page

lcaseydc
VP-CART New User

USA
90 Posts

Posted - March 31 2003 :  02:03:56  Show Profile  Reply with Quote
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

Go to Top of Page

support
Administrator

4679 Posts

Posted - March 31 2003 :  02:43:43  Show Profile  Visit support's Homepage  Reply with Quote
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


Go to Top of Page

ironhawker
VP-CART Super User

USA
260 Posts

Posted - June 10 2008 :  02:08:39  Show Profile  Visit ironhawker's Homepage  Reply with Quote
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?
Go to Top of Page

ironhawker
VP-CART Super User

USA
260 Posts

Posted - March 21 2009 :  18:20:04  Show Profile  Visit ironhawker's Homepage  Reply with Quote
So Howard?
Anybody get it to work?

~-~-~-~-~-~-~-~-~-~
Randy "RC" Corn
Institute for Higher Learning
[email protected]
http://www.ironhawker.com
425-828-0738
Go to Top of Page

ironhawker
VP-CART Super User

USA
260 Posts

Posted - September 09 2009 :  18:55:40  Show Profile  Visit ironhawker's Homepage  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00