Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 sort by supplier id
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

b3troy
Starting Member

Australia
3 Posts

Posted - November 06 2003 :  16:49:06  Show Profile  Visit b3troy's Homepage  Reply with Quote
Hi

I have made some changes to the file shopdisplaycategories.asp, so that if the supplier id is passed the categories are restricted by only showing that category that has products with that supplier.

around line 54
if Request("bndid")<>"" then
sql=sql & " and (categoryid in (select ccategory from products where supplierid="& Request("bndid")&")) "
end if

However this only picks up the first category in ccategory, 12,2 so the 2 is missed.

Any suggestions?

Regards,
Troy

b3troy
Starting Member

Australia
3 Posts

Posted - November 06 2003 :  23:23:41  Show Profile  Visit b3troy's Homepage  Reply with Quote
my solution for your interest,

if Request("bndid")<>"" then
SQL=" SELECT products.supplierid, categories.categoryid, categories.catdescription, categories.highercategoryid, categories.catimage, categories.hassubcategory, categories.cathide, categories.catextra, categories.productmatch, categories.customermatch, categories.catmemo FROM (prodcategories INNER JOIN categories ON prodcategories.intcategoryid = categories.categoryid) INNER JOIN products ON prodcategories.intcatalogid = products.catalogid WHERE (((products.supplierid)=" & Request("bndid") & "))"
end if

Regards,
Troy


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