Getting a Products Category
Posted: Sun Jul 11, 2010 11:16 am
Is there any way of getting a category by using the Product? I am having trouble figuring out how to bring back the product's category
Code: Select all
Category category = CategoryDataSource.Load(product.Categories[0]);
Code: Select all
foreach (int categoryId in product.Categories)
{
Category category = CategoryDataSource.Load(categoryId);
//do the stuff with loaded category here
}