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
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Cross selling customization
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

25 Posts

Posted - May 29 2005 :  00:50:55  Show Profile  Reply with Quote
This is my first time use of VPASP cart.

At present the cross selling links appear either as text links or image links in the area where [add_crossselling] is mentioned in the shopexd.asp

Is there any way that we can have the crosslink products appear on a seperate page and in the main shopexd.asp just have a link to that page. eg. click here to view related products. this would be a link to a new page with all the cross selling items listed there

Any help would be greatly appreciated

Senior Member

United Kingdom
1898 Posts

Posted - May 29 2005 :  04:14:37  Show Profile  Visit devshb's Homepage  Reply with Quote
For that, I think you'd need to do something like this:

1) Create a copy of the cross-selling function/template-field (in shopfileio.asp) so that it returns the "go to" page rather than the list.
2) Change your product detail template to use that new function
3) Create a new product detail template (a copy of tmp_product.htm, call it tmp_productcross.htm) which uses the normal function, and which has less info on it (ie the "cross-selling info page")

For 1, in shopfileio.asp locate:

Handle_CROSSSELLING value,parsearray, parseRS

and add extra lines under that for:

Handle_CROSSSELLING_GOTO_PAGE value,parsearray, parseRS

Then in shopfileio.asp, add a new function (anywhere'll do) like this:

Sub Handle_CROSSSELLING_GOTO_PAGE(ivalue,parsearray,parseRS)
dim lngcstock
dim strCrossProductIDs,strsql, rs, strmessage, strcdescurl,strurl
dim fieldtype,rc
Dim tcount
Dim thtml
Dim turl
FindInDatabase "CROSSSELLING", strcrossProductids, fieldtype, rc, parsearray
If rc>0 then exit sub
if strCrossProductids="" then exit sub
strsql="select * from products where catalogid in (" & strcrossproductids & ")"
strsql=strsql & " and hide=0"
if getconfig("xstocklow")<>"" then
lngcstock= clng(getconfig("xstocklow"))
strsql = strsql & " and cstock> " & lngcstock
end if
set rs=dbc.execute(strsql)
While Not rs.EOF
set RS=Nothing
if (tcount>0) then
' If using vpasp 5.5, use this line, otherwise don't :
thtml="<a href="&chr(34)&turl&chr(34)&">View Cross Selling Products</a>"
Response.Write "<br>"&thtml
end if
end sub

For 2, in tmp_product.htm, change [ADD_CROSSSELLING] to [ADD_CROSSSELLING_GOTO_PAGE]

Talking about cross-selling stuff makes me think I should make a shameless plug for something else that you might find relevant -

The "Customers who bought this, also bought these..." template-field:


Simon Barnaby
[email protected]
Web Design, Online Marketing and VPASP addons

Edited by - devshb on May 29 2005 04:16:50

Edited by - devshb on May 29 2005 04:21:13
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000