Digital commerce setup
Features described on this page require the Xperience by Kentico Advanced license tier.
Developer preview feature
The digital commerce feature is currently not fully functional, and primarily intended to allow technical users to familiarize themselves with the development process of the commerce feature. You can expect the feature to be updated and extended in upcoming releases.
The related API is marked as experimental and usage will result in warnings when compiling your project. The warnings are treated as errors for reporting purposes. To use the code, you need to suppress the warnings.
What should you do with this feature?
- DO try out development of digital commerce and examine the sample in the Dancing Goat project template.
- DO feel free to share your feedback with the Kentico Product team.
- DO NOT use this feature in public facing and production applications, as the feature is currently incomplete.
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.
- Implement the shopping cart and checkout process.
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
ShoppingCartOptions
and 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)
);