Author |
Topic |
|
salja03
Starting Member
9 Posts |
Posted - January 22 2007 : 09:58:34
|
Hi,
I want to create a list, in much the same format as the catagories list but for either Brands, or Suppliers. ie. A series of products have a Brand of 'Yellowstone'. I would like a list of Brands, where if someone clicks on 'Yellowstone', they will get all products with that Brand. Similarly for Suppliers...
I'm sure it's easy to do, but I'm not positive on where to start, or look for code...
Any help greatly appreciated
Thanks,
James |
|
Mark Priest
VP-CART Expert
United Kingdom
580 Posts |
Posted - January 23 2007 : 19:36:56
|
Ive been asking the same question, would be very handy.
Regards,
Mark |
|
|
salja03
Starting Member
9 Posts |
Posted - January 24 2007 : 00:58:36
|
Hi mark,
I have worked out how to do it...
In the header file i added:
<!--START OF Designers BOX--> <tr> <td style="width: 155px"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class=menuhdr><%=getlang("langcommondesigners")%></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="dashed"> <tr> <td><%NavigateShowDesignersStyled%></td> </tr> </table></td> </tr> </table></td> </tr> <!--END OF Designers BOX-->
------------------------------------------------------------ then in shopproductssub.asp I added the following code (inserted above the sub which starts: 'Displays stylesheet driven menu Sub NavigateShowCategoriesStyled() ------------------------------------------------------------ <!-- Displays Manufacturer menu --><% 'Displays stylesheet driven menu Sub NavigateShowDesignersStyled()
If getconfig("xlogonrequired")="Yes" then If getsess("login")="" then exit sub end if end if If getconfig("init")="" then exit sub dim cid, name,catSQL,i
dim strmanufacturer, mancount, manufacturers
Dim catdbc,catrs, hassubcategory,mylink
'mancount=getsess("mancount") If mancount="" then mancount=0 If xusefilesession="Yes" then mancount=0 end if If mancount=0 then mancount=0 redim manufacturers(100) ShopOpenDatabaseP catdbc If not catdbc.state=adStateOpen then shopclosedatabase catdbc exit sub end if catSQL="Select Distinct mfg from products WHERE hide=0 Order By Mfg ASC" set catrs=catdbc.execute(catsql) While Not catrs.EOF name=catrs("Mfg") if Trim(name)<>"" then mylink="<a HREF=""shopquery.asp?Mfg="& name & """</a>" & name end if manufacturers(mancount)=mylink mancount=mancount+1 catrs.MoveNext Wend setsessa "manufacturers",manufacturers setsess "mancount",mancount catrs.Close set catrs=nothing ShopCloseDatabase catdbc end if ' mancount=getsess("mancount") manufacturers=getsessa("manufacturers") %><table border=0 cellpadding=0 cellspacing=0 width="100%"><% for i = 0 to mancount-1 mylink=manufacturers(i) %><tr valign='top'><td class=leftmenumain><% response.write mylink %></td></tr><% next %></table><% end sub
Works perfectly... no problems at all... |
|
|
Mark Priest
VP-CART Expert
United Kingdom
580 Posts |
Posted - January 28 2007 : 21:12:59
|
Hi Salja
Im getting errors here?
I see that you have incorporated some HTML code into the sub is this causing my errors?
Regards,
Mark http://www.fireworkcrazy.com |
|
|
salja03
Starting Member
9 Posts |
Posted - January 31 2007 : 11:52:23
|
Mark, you need to put the HTML code at the top in the header file,and the sub in the shopproductssub.asp file. Hope that makes sense?
James |
|
|
Mark Priest
VP-CART Expert
United Kingdom
580 Posts |
|
salja03
Starting Member
9 Posts |
Posted - February 01 2007 : 12:55:10
|
perhaps you should post your header file then? |
|
|
|
Topic |
|