Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 products by Brand/Supplier
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

salja03
Starting Member

9 Posts

Posted - January 22 2007 :  09:58:34  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
Ive been asking the same question, would be very handy.

Regards,

Mark
Go to Top of Page

salja03
Starting Member

9 Posts

Posted - January 24 2007 :  00:58:36  Show Profile  Reply with Quote
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...
Go to Top of Page

Mark Priest
VP-CART Expert

United Kingdom
580 Posts

Posted - January 28 2007 :  21:12:59  Show Profile  Reply with Quote
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
Go to Top of Page

salja03
Starting Member

9 Posts

Posted - January 31 2007 :  11:52:23  Show Profile  Reply with Quote
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
Go to Top of Page

Mark Priest
VP-CART Expert

United Kingdom
580 Posts

Posted - February 01 2007 :  06:17:38  Show Profile  Reply with Quote
I did that but it just broke the display.

Regards,

Mark
http://www.fireworkcrazy.com
Go to Top of Page

salja03
Starting Member

9 Posts

Posted - February 01 2007 :  12:55:10  Show Profile  Reply with Quote
perhaps you should post your header file then?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00