Browse - Product Listing On Category Page

Build a product listing base with products in a given category. You will gain knowledge about APIs relevant to efficient loading of products and categories from Ucommerce, as well as dealing with prices and simple discounts.

 


Relevant APIs

 

 

UCommerce.EntitiesV2.Product
PrimaryImageMediaId
ThumbnailImageMediaId
UCommerce.Runtime
SiteContext.Current.CatalogContext
CurrentCatalog
CurrentCategory
UCommerce.Api
CatalogLibrary.GetProducts(category)
UCommerce.Extensions
Product.DynamicProperty()
Product.DisplayName()
Product.ShortDescription()
Product.LongDescription()
UCommerce
Money

Hands-on

In the CategoryController, map the Products property on the CategoryViewModel to hold the list of products in CurrentCategory.

 


Bonus

Display product images using Sitecore APIs. Does the ProductViewModel contain enough fields to do so?

 

 

{{lineitem.ProductName}}

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

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