Browse - Category Navigation

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 “CategoryNavigation.ascx.cs” under the UserControls folder in the website project.
On Page_Load, build and render the usercontrol “CategoryNavigation.ascx” as requested with the following line in “Main.Master”:

<uc:CategoryNavigation id="UCCategoryNavigation" runat="server" />

Find categories and sub categories using the CatalogLibrary and map them into the CategoryModel list.
Map the categories recursively by adding sub categories into the model as well as using CatalogLibrary to find the children.
Add link to the CategoryModel.Url that points to ‘/category?category=categoryId’.


Bonus

Try creating multiple stores in Kentico. Create a new Kentico Site. Create a new store in Ucommerce. Set up a new catalog and new categories under the
store as well. Assign different domains to each of the stores. Create new content structure in the Pages application for your new store.

Visit the new site. Did the category navigation change?



More information can be found on the documentation site:
http://docs.ucommerce.net/ucommerce/v6.8/getting-started/catalog-foundation/catalog-structure.html

{{lineitem.ProductName}}

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

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