Browse - Category Navigagtion

Build a category listing for overall navigation of your store. You will gain knowledge of APIs relevant to loading categories and their related information along with an overall understanding of how to navigate the catalog structure.

 


Relevant APIs

UCommerce.Api
CatalogLibrary.GetRootCategories(ProductCatalog)
CatalogLibrary.GetCategories(Category)
CatalogLibrary.GetNiceUrlForCategory() (optional)
UCommerce.Extensions
CategoryExtensions.DisplayName()

Hands On

 

Find the “CategoryController”.

The method “Index” renders the view “/views/category.cshtml” with the categoryViewModel.

Map “CurrentCategory” to the categoryViewModel with
• Name
• Description


Bonus

  • Display category images using Sitefinity APIs.
  • Figure out if there’s a suitable property you can use, or you need to extend the CategoryViewModel with a property to hold the image
{{lineitem.ProductName}}

{{lineitem.VariantName}} - {{lineitem.Quantity}} x {{lineitem.FormattedPrice}} {{lineitem.FormattedPrice}}

Your cart is empty ;(
Total {{basket.FormattedProductsTotal}}
Checkout