Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Search Based On Price Range
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rickwp
Starting Member

USA
3 Posts

Posted - September 16 2002 :  02:09:12  Show Profile  Visit rickwp's Homepage  Reply with Quote
I'm trying to figure out how to set up shopquery.asp to search "within a price range" instead of just "less than or equal to a price amount", but I'm not having much luck as I am new to asp and vbscript programming...

I took this section from shopquery.asp...

If Fieldtype="Currency" then
if strvalue<0 then
exit sub
end if
If not IsNumeric(strvalue) then
exit sub
end if
if getconfig("xConvertEuropeanNumbers")="Yes" then
strvalue=replace(strvalue,",",".")
end if
'strvalue=Formatnumber(strvalue,2)
addprefix
SQL=SQL & " " & strname & "<=" & strvalue
exit sub
end if


and tried to replace it with...

If Fieldtype="Currency" then
if strvalue<0 then
exit sub
end if
If not IsNumeric(strvalue) then
exit sub
end if
if getconfig("xConvertEuropeanNumbers")="Yes" then
strvalue=replace(strvalue,",",".")
end if
'strvalue=Formatnumber(strvalue,2)
addprefix
if strvalue="15" then
SQL=SQL & " " & strname & "<=" & strvalue
endif
if strvalue="25" then
SQL=SQL & " (" & strname & "<=" & strvalue & " AND " & strname & ">15)"
endif
if strvalue="50" then
SQL=SQL & " (" & strname & "<=" & strvalue & " AND " & strname & ">25)"
endif
exit sub
end if


Can anyone more experienced see where I am going wrong with this... it produces a "there is a problem with the page you are trying to view" error. I tried it with and without quotes around the numbers 15, 25, 50 in "if strvalue=15" lines, but got same results. I'm stumped. Any help would be greatly appreciated!

-Rick
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00