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

 All Forums
 VPCart Forum
 Customization
 Search products by customer
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lstephan
Starting Member

4 Posts

Posted - January 24 2006 :  13:20:26  Show Profile  Reply with Quote
Hi

I would like to make a dropdown list from manufacturers so that customers could search products from manufacturers..

Any idea?

Thanks a lot

rustytec
VP-ASP New User

Australia
113 Posts

Posted - January 24 2006 :  15:04:10  Show Profile  Reply with Quote
Hi,

I use the following code and it works well for me:


<!-- get mfg from products-->
		 
		 <%' Change blue text to your DataBase location.
			Dim Mfgset,sqlstr,myconn,strMfgline,rs
			ShopOpenDatabase myconn
			Set rs = myconn.Execute("SELECT distinct upper(mfg)as mfg from products where mfg > ' '") 
			%> </font></font> <font size="1" face="Verdana, Arial, Helvetica, sans-serif"> 
			<form name="form1">
			<select name="menu1" onChange="MM_jumpMenu('parent',this,0)" style="font-size:8pt">
			<OPTION VALUE="Select Manufacturer" selected>Select Brand</option>
			<% Do While Not rs.EOF
				if rs("mfg")<>"" then %>
					<OPTION VALUE="shopquery.asp?mfg=<%= rs("mfg") %>"><%= rs("mfg") %></option>
				<% end if
				rs.MoveNext %>
			<% Loop %>
			</SELECT>
			</form>
			</font> 
			<%rs.Close
			conn.Close
			Set rs = Nothing
			Set conn = Nothing
		%>


NB > If you are using access, change the 'upper' to 'ucase'.

Also : put the following in your header


<script language="JavaScript" type="text/JavaScript">
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script> 


Hope this helps.

cheers
rustytec
Go to Top of Page

lstephan
Starting Member

4 Posts

Posted - January 25 2006 :  00:42:17  Show Profile  Reply with Quote
hI rustytec

i will try it but to wich page do you add this code?

And do you have a live example of it ( website)?

Thanks a lot

L Stephan Brest France
Go to Top of Page

rustytec
VP-ASP New User

Australia
113 Posts

Posted - January 25 2006 :  00:51:49  Show Profile  Reply with Quote
Hi lstephan,

Any page that you want the drop down box to appear.

The site I am using it in is still production at the moment. But it is any easy placement.

Mine is in a table in the left column.

cheers

Russ
rustytec
Go to Top of Page

lstephan
Starting Member

4 Posts

Posted - January 25 2006 :  01:28:06  Show Profile  Reply with Quote
Hi rustytec

Thanks a lot for your help.

Have a nice day ( Brest France 09:28 AM )
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000