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 Category.aspx.cs, map the Products property on the CategoryProductModel to hold the list of products in CurrentCategory.


Bonus

Display product images using Kentico APIs. Does the ProductModel contain enough fields to do so or do you need to add extra fields? Remember to view images you should make use of ImageService.

{{lineitem.ProductName}}

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

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