Welcome, Guest ( Customer Panel | Login )




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

anisha
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

devshb
Senior Member

United Kingdom
1904 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:

Case "ADD_CROSSSELLING"
Handle_CROSSSELLING value,parsearray, parseRS
rc=0

and add extra lines under that for:

Case "ADD_CROSSSELLING_GOTO_PAGE"
Handle_CROSSSELLING_GOTO_PAGE value,parsearray, parseRS
rc=0

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)
tcount=0
While Not rs.EOF
tcount=tcount+1
RS.MoveNext
Wend
RS.Close
set RS=Nothing
if (tcount>0) then
turl="shopexd.asp?id="&rs("catalogid")&"&template=tmp_productcross.htm"
' If using vpasp 5.5, use this line, otherwise don't :
turl=addwebsess(turl)
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:

http://bigyellowzone.com/shopexd.asp?id=97


Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
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
0 Item(s)
$0.00