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
 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-ASP 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-ASP 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-ASP 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-ASP 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-ASP 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

4266 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-ASP 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-ASP 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-ASP 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