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-Cart StoreFront Customer Forum

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

 All Forums
 VPCart Forum
 cross-selling script help needed
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

45 Posts

Posted - January 13 2004 :  20:18:15  Show Profile  Reply with Quote
Howard was nice enough to provide me with script that has cross-selling with images. Specifically, the cross-selling table had two columns - the one on the left had a picture while the one on the right had the product description. I've altered the script to show the table with only the left column of images. However, my images are small and I would like to have two columns of cross-selling images for a nicer look. Any ideas on how to do this?
I asked support but he (Radek Rekas) said they cannot help me.

VP-ASP New User

192 Posts

Posted - January 14 2004 :  09:34:41  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
Can you post that piece of code here so we can see what you're working with?

All the best,

Jon Madrid
Madrid Communications
Web Design, Development, and Hosting
Go to Top of Page

Starting Member

45 Posts

Posted - January 14 2004 :  10:54:54  Show Profile  Reply with Quote
sure... the script is located in shopfileio.asp
here's the part that I think deals with cross-selling. Let me know if there are additional subs I should paste. Thanks in advance!

Sub HandleCrosssellingImages (rs)
dim headerok
If rs.eof then
Closerecordset rs
exit sub
end if
While Not rs.EOF
addCrossellingrow rs
Closerecordset rs
if headerok=true then
response.write "</table>"
end if
end sub

Sub addCrossellingHeader
' Start crossselling table
Response.write reporttabledef
response.write reportheadrow
response.write ReportHeadColumn
Response.write getlang("LangCrossSellingMessage")
Response.write ReportHeadColumnEnd
response.write reportrowend
Response.write tabledefend
Response.write reporttabledef
end sub
' format one row of crossselling.
' all products must have an image
Sub AddCrossellingrow (rs)
dim catalogid, imagefile, cname, cprice, url
dim buttonimage, buttontext, buttonname
if isNull(buttonimage) Or buttonimage="" then
end if
If isnull(url) then
end if
if ucase(URL)="SHOPEXD.ASP" then
url="shopexd.asp?id=" & rs("catalogid")
url="shopquery.asp?catalogid=" & rs("catalogid")
end if
Response.write reportdetailrow
response.write reportdetailcolumn
Response.write "<a href='" & url & "'><img src='" & imagefile & "' border='0'></a>"
response.write reportDetailColumnEnd
response.write reportdetailcolumn
'response.write "<a href='" & url & "'>" & cname & "</a>"
'text above line to remove second column of cross-selling table and leave only image column
response.write reportDetailColumnEnd
response.write "</tr>"
end sub

Go to Top of Page

Starting Member

45 Posts

Posted - January 15 2004 :  15:51:49  Show Profile  Reply with Quote
I solved it by creating another subroutine for cross-selling called[ADD_CROSSSELLING2] using the extra variable called pother2. It means that I have to put the cross-selling products in two fields in my products table... but so be it.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000