Hi guys,
This has been having me go round in circles all weekend.
I'm trying to get a portion of the cdescription field added to the cross selling section of our expanded views. However it is proving hell and I think that it needs fresh eyes looking at it.
I'm not worried about getting the first so many words shown yet because at the moment I can't get any of it to show. So at the moment I'm just trying to get the whole description to show.
Here's the code:
Sub FormatAssociatedrow (rs,prodcount,linecount)
dim hideprice
hideprice = false
if getconfig("xdisplayprices") <> "Yes" then
hideprice = true
end if
if getconfig("xpriceloggedinonly") = "Yes" then
if Getsess ("login") = "" then
hideprice = true
end if
end if
dim catalogid, imagefile, cname, cprice, url, cdescription, extendeddesc
dim buttonimage, buttontext, buttonname
buttonimage=Getconfig("xbuttonmoreinfo")
buttontext=getlang("langProductExtendeddescription")
buttonname="View"
if isNull(buttonimage) Or buttonimage="" then
buttonimage=""
end if
catalogid=rs("catalogid")
imagefile=rs("pother2") & "-" & rs("cimageurl")
URL=rs("cdescurl")
If isnull(url) then
URL=getconfig("xCrossLinkURL")
end if
if ucase(URL)="SHOPEXD.ASP" then
url="x/" & rs("catalogid") & "/" & rs("level4") & "/" & rs("pdlknm")& ".html"
else
url="x/" & rs("catalogid") & "/" & rs("level4") & "/" & rs("pdlknm")& ".html"
end if
url = addwebsess(url)
cname=rs("cname")
cdescription = rs("cdescription")
dim assocdbc
shopopendatabase assocdbc
cname=translatelanguage(assocdbc, "products", "cname","catalogid", catalogid, cname)
cdescription = translatelanguage(assocdbc, "products", "cdescription","catalogid", catalogid, cdescription)
shopclosedatabase assocdbc
dim xprice
xprice=rs("cprice")
Response.write "<div class=""alsoBoughtItems"">"
Response.write "<div class=""alsoBoughtItemsImage"">"
Response.write "<a href=""" & url & """ title=""" & cname & """>"
Response.write "<img src=""http://tt.temptationsdirect.net/temptations/thumb/" & imagefile & """ border=""0"" alt=""" & cname & """ title=""" & cname & """ width=""100"" height=""150""></a></div>"
Response.write "<div class=""alsoBoughtItemsContent"">"
Response.write "<strong><a href=""" & url & """ title=""" & cname & """>" & cname & "</a></strong>"
Response.write "<br>Only £" & xprice
Response.write "<br> & cdescription
Response.write "</div>"
Response.write "</div>"
end sub
In theory it is very simple, I call the cdescription contents and then show them at the end of the sub, but they don't appear.
Can anyone spot any stupid error I've made?
Thanks
Steve
Sex toys from a UK sex shop including vibrators and dildos.