hakkatil
VP-CART New User
109 Posts |
Posted - June 14 2002 : 11:44:58
|
Hi guys Do you want to use letters for searching or querying products. This code intends to put characteres from A to Z on what ever place you like. So, you can use alphabetical navigation to display products This should work vpasp 4.0 and older versions, since nothing changed from the original vpasp files.
create a page called say letters.asp and paste below code into it
<% '***************************letters.asp '** Written by Hakan Atilgan '** This will display characters alphabeticly on a page '** If your language has different characters please replace them in myarray '** Turkish and English characters supplied '** A B C Ç D E F G H I J K L M N O Ö P Q R S T U Ü V W X Y Z ' Turkish characters
dim myarray, k myarray = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z") response.write "<table align=left width=500><tr><td><p align=center><font size=1>"
for k=0 to 25%> <font size=1 color=white><a href="shopquery.asp?cname=<%=myarray(k)%>" class=submitbtn><%=myarray(k)%></a></font> <%next response.write "</font></p></td></tr></table>" '**************************************************************** %>
After this point just include letter.asp on any page you like. Lets say shoppage_header.htm using <!--#include file="letters.asp"--> if letters.asp is on same directory with vbasp files.
Isn't that so easy?
|
|