Digital commerce setup
Features described on this page require the Xperience by Kentico Advanced license tier.
The digital commerce feature helps you build simple online stores where you can sell physical or digital products. It gives you the basic tools, data structure, and actions you need to manage your shop and process orders. You can use it to set up product listings, handle purchases, and store customer data. Custom development is needed to fully set up and customize your shop, but this feature takes care of the main building blocks so you don’t have to start from scratch.
To use the commerce features of Xperience by Kentico:
- Enable and configure the commerce feature.
- Prepare a product catalog and fill it with products.
- You need to implement stock management to track product availability. You can do this by modeling the product stock as a custom module.
- Implement shipping and payment methods.
- Implement the shopping cart and checkout process.
- The shopping cart and checkout interfaces need to be implemented as custom pages or widgets.
- Configure order statuses and set up notifications for order status changes.
- Display the product catalog on your storefront (your public-facing interface where customers browse and purchase products).
- Depending on your product catalog model, you can either directly display product pages (if using pages to store products) or create pages for each product using custom code (if using the content hub to store products).
Enable digital commerce
To enable the commerce feature:
Open your Xperience project in Visual Studio and edit the Program.cs file.
Enable the commerce feature in the application startup:
C#Program.csusing Kentico.Xperience.Commerce; ... WebApplicationBuilder builder = WebApplication.CreateBuilder(args); ... builder.Services.AddKentico(features => { // Enables digital commerce features.UseCommerce(); });
Configure commerce features
Configure shopping cart
You can configure the expiration time of shopping carts. The value is used as the expiration time of the shopping cart cookie as well as the time after which any shopping cart is deleted. The default value is 1 day.
Note: The scheduled task that deletes shopping carts older than the specified value is executed once per day. Using values of less than 1 day has no effect.
To configure the shopping cart:
- Open your Xperience project in Visual Studio and edit the Program.cs file.
- Configure
ShoppingCartOptionsand set the available properties, such asExpiration.
using Kentico.Xperience.Commerce;
...
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
...
builder.Services.Configure<ShoppingCartOptions>(
// Sets the expiration time of shopping carts
options => options.Expiration = TimeSpan.FromDays(30)
);
Reference implementation
The sample Dancing Goat project provides a production-ready implementation of the digital commerce solution that demonstrates how to integrate all commerce features into a working online store. The sample site includes complete implementations of:
- Product catalog modeling and display
- Shopping cart functionality
- Checkout process with multiple steps
- Price calculation with custom tax logic
- Order management and status tracking
- Customer account integration
Documentation pages in this section often reference specific parts of the Dancing Goat implementation when describing features and providing code examples. We recommend examining the sample site’s source code alongside this documentation to see how individual commerce components work together in a complete solution.
The Dancing Goat implementation serves as a practical reference for:
- Architecture patterns – See how to structure your commerce-related services, controllers, and view models.
- Best practices – Learn recommended approaches for error handling, validation, and data flow.
- Integration examples – Understand how commerce features integrate with Xperience’s content management, membership, and other capabilities.
- Customization techniques – Explore examples of extending default behaviors to meet specific business requirements.
You can use the Dancing Goat implementation as a starting point for your own commerce solution, adapting its patterns and code to your specific needs.