Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers

Catalog Context

The Catalog context is the most fundamental component to help you build a nice browse flow for your visitors. It will contain a reference to where your visitor are right now and help you make a decision on what to show / query next.

The component is located in the following namespace:

    using Ucommerce.Api;

You can grab a reference to the current instance of CatalogContext using:

    Ucommerce.Api.ICatalogContext catalogContext = ObjectFactory.Instance.Resolve<ICatalogContext>();

The Catalog Context allows you to grab any part of the catalog your visitor is currently browsing. All of the return types are located under

    using Ucommerce.Search.Models;

Available items you can retrieve are

    Ucommerce.Search.Models.ProductCatalogGroup currentCatalogGroup = ObjectFactory.Instance.Resolve<ICatalogContext>().CurrentCatalogGroup;
    Ucommerce.Search.Models.ProductCatalog currentCatalog = ObjectFactory.Instance.Resolve<ICatalogContext>().CurrentCatalog;
    Ucommerce.Search.Models.Category currentCategory = ObjectFactory.Instance.Resolve<ICatalogContext>().CurrentCategory;
    Ucommerce.Search.Models.Product currentProduct = ObjectFactory.Instance.Resolve<ICatalogContext>().CurrentProduct;
    Ucommerce.Search.Models.PriceGroup currentPriceGroup = ObjectFactory.Instance.Resolve<ICatalogContext>().CurrentPriceGroup;