<% '************************************************************************ ' adds item to comparison array ' VP-ASP 6.50 ' December 13, 2006 - CB '*********************************************************************** dim rs, dbc, catalogid catalogid = request("catalogid") if not isnumeric(catalogid) then catalogid="" end if if catalogid = "" then shoperror getlang("langnocatalogid") end if 'Check if there are already too many items in list dim comparelist, howmanycompares comparelist = getsess("compareproducts") if instr(comparelist, ",") > 0 then comparelist = split(comparelist, ",") howmanycompares = ubound(comparelist) + 1 else if comparelist > "" then howmanycompares = 1 else howmanycompares = 0 end if end if if cint(howmanycompares) >= cint(getconfig("xcomparemax")) then shoperror getlang("langcomparetoomany") end if 'Check if item is already in list comparelist = "," & getsess("compareproducts") & "," if instr(comparelist, "," & catalogid & ",") > 0 then shoperror getlang("langcomparealready") end if if howmanycompares > getconfig("xcomparemax") then shoperror getlang("langcomparetoomany") end if 'Add catalogid to comparison list setsess "compareproducts", getsess("compareproducts") & "," & catalogid if left(getsess("compareproducts"), 1) = "," then setsess "compareproducts", right(getsess("compareproducts"), len(getsess("compareproducts")) - 1) end if responseredirect "shopcomparison.asp" %>