Want to display all Products with groupings

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Want to display all Products with groupings

Post by Mike718NY » Thu Aug 05, 2010 11:09 am

Are there any sql queries out there to display
all the products in the database, grouped by Category, Vendor, etc.?

SELECT [Name] ,[Price] ,[ManufacturerId] ,[Sku] ,[ModelNumber] ,VisibilityId]
FROM ac_Products

but would need joins to other tables.
Has anyone have already written these queries?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Want to display all Products with groupings

Post by mazhar » Fri Aug 06, 2010 5:24 am

Simple query could be something like this. I am not sure about grouping you can extend it to meet your needs

Code: Select all

SELECT P.Name ,P.Price ,P.ManufacturerId,CN.CategoryId ,P.Sku ,P.ModelNumber ,P.VisibilityId
FROM ac_Products AS P JOIN ac_CatalogNodes AS CN ON P.ProductId = CN.CatalogNodeId
WHERE CN.CatalogNodeTypeId=1

Post Reply