ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - managing categories and brands
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

managing categories and brands

 Post Reply Post Reply
Author
Message
fischerj View Drop Down
Newbie
Newbie


Joined: 26-August-2006
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote fischerj Quote  Post ReplyReply Direct Link To This Post Topic: managing categories and brands
    Posted: 16-March-2007 at 2:24am
I want to be able to setup my site so, when a user clicks on a category they will be directed to a page that has icons of all the brands within that category. I looked through the control panel and knowledge base and couldn't find anything.  Any help would be great!

Justin
Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers


Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post Posted: 16-March-2007 at 9:13pm
You would need to customize viewcategories.asp. Brands are tied to products, not categories, so you would need to write a SQL query that would retrieve a distinct list of brands from the products in the selected category. You could look in the viewBrands.asp to see the code to load and display the brand icons.
NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
fischerj View Drop Down
Newbie
Newbie


Joined: 26-August-2006
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote fischerj Quote  Post ReplyReply Direct Link To This Post Posted: 17-March-2007 at 1:38am
Thanks for the reply!  That sounds like some serious editing.  Any ideas of resources on doing these kinds of database queries?

Thanks for the help!
Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers


Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post Posted: 17-March-2007 at 8:45am

Are you pretty comfortable with ASP and SQL?
If so, then try sites like http://msdn2.microsoft.com/en-us/library/bb264565.aspx.
If not, try http://www.w3schools.com/default.asp for tutorials on many subjects related to web design included ASP and SQL. If you do a search on "writing SQL queries" you'll find a bunch of sites.

Anyway, the basics of what you'll need to do are as follows. (Please note, this should be one long string but I split it into different lines for readability):


SELECT idBrand,BrandName,BrandLogo
FROM Brands
WHERE idBrand IN (SELECT DISTINCT IDBrand FROM products INNER JOIN categories_products ON products.idProduct = categories_products.idProduct WHERE (categories_products.idCategory = idCategory) AND (products.active = - 1) AND (products.configOnly = 0) AND (products.removed = 0))
ORDER BY BrandName ASC;

The "WHERE idBrand IN (...)" statement basically gets a unique list of the Brand IDs for the products in a specific category. You will need to change the section that says:

categories_products.idCategory = idCategory

by changing "= idCategory" to the actual category you are working with in viewCategories.

Then the main query retrieves the brand info for brands with the BrandIDs for the products in the selected category.

Hope this gives you a good starting point. If you still can't figure it out, you could hire one of the Product Cart developers. (We are one but there are others.)

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
fischerj View Drop Down
Newbie
Newbie


Joined: 26-August-2006
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote fischerj Quote  Post ReplyReply Direct Link To This Post Posted: 24-March-2007 at 6:12pm

Thanks for the detailed reply! I haven't had a chance to test it out yet, but I'll let you know the result.

 

Thanks again!

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.