Kentico.Xperience.StoreApi
1.2.2
Prefix Reserved
dotnet add package Kentico.Xperience.StoreApi --version 1.2.2
NuGet\Install-Package Kentico.Xperience.StoreApi -Version 1.2.2
<PackageReference Include="Kentico.Xperience.StoreApi" Version="1.2.2" />
paket add Kentico.Xperience.StoreApi --version 1.2.2
#r "nuget: Kentico.Xperience.StoreApi, 1.2.2"
// Install Kentico.Xperience.StoreApi as a Cake Addin #addin nuget:?package=Kentico.Xperience.StoreApi&version=1.2.2 // Install Kentico.Xperience.StoreApi as a Cake Tool #tool nuget:?package=Kentico.Xperience.StoreApi&version=1.2.2
Xperience by Kentico - Kentico Xperience 13 E-commerce
Name | Package |
---|---|
Kentico.Xperience.K13Ecommerce | |
Kentico.Xperience.Store.Rcl | |
Kentico.Xperience.StoreApi |
Description
This integration is primary intended for existing Kentico Xperience 13 (KX 13) E-Commerce projects to enable them to migrate
to new Xperience By Kentico (XbyK) and still use KX 13 E-Commerce functionality.
It can also be used as a basis for new projects where E-Commerce data will be stored on KX 13, but further development is necessary to achieve this goal.
This solution covers several scenarios according to the complexity of integration between XByK and KX 13:
Product listing widget
- We recommend to use this widget for simple scenarios such as Landing page offers, etc.
- Product listing widget example is located in Dancing Goat XbyK example project.
- The widget is used to display products directly from KX 13, purchase itself still takes place on Kentico 13.
- The widget has a couple of properties based on the Store property selector which enable to display products for given category, culture and currency.
Full scale e-commerce solution
- We recommend to use for possible partial migration of existing e-commerce projects from KX 13 to XbyK.
- Product data (with variants and images) is synchronized to Content hub (can be turned off).
- Product listing, detail and checkout process are placed on XbyK (shopping cart is saved and calculated still on KX 13).
- Orders are created from cart, order related data is saved on KX 13 side.
- Products need to be linked from Content hub to pages in website channel applications. This can either be done manually or using automatic product page synchronization. You can use CI to restore examples of content types for pages that display products. See this section of User Guide for detailed information.
- Sample XbyK Dancing Goat site implements store functionality and can be used as an example of migration of existing e-commerce projects to new XbyK.
The integration provides an API with services for implementing the following scenarios:
- Listing products based on parameters, product categories, prices and inventory
- Actions with shopping cart, changing currency and order creation
- Listing of orders in the administration
- Listing of orders on the live site for the current customer
- Updates of existing orders
- Retrieving and listing order statuses
- Listing site cultures and currencies
- Check this part of User Guide for more specific description
Project structure
There are currently 2 solutions:
Kentico.Xperience.K13Ecommerce.sln
Complete solution with all libraries and sample sites:
Kentico.Xperience.StoreApi
- library for Kentico 13 that exposes a REST API for an E-Commerce site.Kentico.Xperience.K13Ecommerce
- library for XbyK connecting to the REST Store API running under Kentico 13.Kentico.Xperience.Store.Rcl
- Razor Class Library for selector components.- Sample Dancing Goat sites
DancingGoat.csproj
- XbyK Dancing Goat (live site channel + administration) enriched with integration to KX 13 Dancing Goat to show how to create simple e-shop with product listing, product detail and checkout process on XByK.Kentico13_DancingGoat.csproj
- KX 13 Dancing Goat example (live site) with configured Store API to demonstrate how you can set up REST Store API on your own KX 13 e-commerce solution.
- KX 13 administration project (CMSApp) is not part of this solution!
Kentico.Xperience.K13Ecommerce.Libs.sln
- Contains only libraries without sample sites, used for publishing of NuGet packages
Library Version Matrix
Summary of libraries which are supported by the following versions Xperience by Kentico / Kentico Xperience 13
Kentico Xperience 13 E-Commerce integration
Library | Xperience Version | Library Version |
---|---|---|
Kentico.Xperience.K13Ecommerce | >= 29.7.1 | >= 1.2.2 |
Kentico.Xperience.K13Ecommerce | >= 29.3.3 | >= 1.1.0 |
Kentico.Xperience.Store.Rcl | >= 29.3.3 | >= 1.1.0 |
Kentico.Xperience.K13Ecommerce | >= 29.2.0 | 1.0.0 |
Kentico.Xperience.Store.Rcl | >= 29.2.0 | 1.0.0 |
Kentico.Xperience.StoreApi | >= 13.0.131 | 1.0.0 |
Dependencies
Xperience by Kentico application:
Kentico Xperience 13 application (or standalone API app):
Package Installation
Xperience by Kentico
Add these packages to your XbyK application using the .NET CLI
dotnet add package Kentico.Xperience.K13Ecommerce
dotnet add package Kentico.Xperience.Store.Rcl
Kentico Xperience 13
Add this package to your Kentico Xperience 13 ASP.NET.Core application (live site or create standalone application when your KX 13 live site is not running)
dotnet add package Kentico.Xperience.StoreApi
Quick Start
Kentico Xperience 13
First set up your Kentico 13 ASP.NET Core application:
- Set up your own settings for Store REST API authentication (based on JWT and OAuth client credentials flow)
{
"CMSStoreApi": {
"Jwt": {
"Key": "YourSecretKeyForAuthenticationOfApplicationMustBeAtLeast64CharsLong",
"Issuer": "yourCompanyIssuer.com",
"Audience": "XbyK-DancingGoat",
"TokenExpiresIn": 60
},
"ClientId": "3ef7fe1b-696c-4afa-8b56-d3176b7bea95",
"ClientSecret": "********************"
}
}
- Add Store API services to application services and configure Swagger
// Startup.cs
public void ConfigureServices(IServiceCollection services)
{
// ...
//Store API registration
services.AddKenticoStoreApi();
//Registers Swagger generation
services.AddKenticoStoreApiSwagger();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment environment)
{
//Registers Swagger endpoint middleware and swagger UI
app.UseStoreApiSwagger();
}
Xperience By Kentico
Then set up your Xperience By Kentico application
- Fill settings to connect your Kentico Xperience 13 instance
{
"CMSKenticoStoreConfig": {
"StoreApiUrl": "http://dev.dancinggoat.com:65375",
"ClientId": "3ef7fe1b-696c-4afa-8b56-d3176b7bea95",
"ClientSecret": "********************",
"ProductSyncEnabled": true,
"StandaloneProductSync": true,
"ProductSyncInterval": 10
}
}
- Add K13Ecommerce library to the application services
// Program.cs
// Registers Kentico Store API and services for e-commerce support
builder.Services.AddKenticoStoreServices(builder.Configuration);
- For the simplest scenario: copy product listing widget from Dancing Goat example project to your project and configure properties to display products from KX 13.
- For more complex scenario with full e-shop, you can be inspired by implementation of Dancing Goat sample Store on XbyK. Check Usage guide for detailed instructions to configure categories, products and cart steps.
- Restore CI repository files to database (reusable content types, custom activities). CI files are located in
.\examples\DancingGoat-K13Ecommerce\App_Data\CIRepository\
and you need to copy these files to your application.
dotnet run --kxp-ci-restore
- Start to use on your live site
Full Instructions
View the Usage Guide for more detailed instructions.
Contributing
To see the guidelines for Contributing to Kentico open source software, please see Kentico's CONTRIBUTING.md
for more information and follow the Kentico's CODE_OF_CONDUCT
.
Instructions and technical details for contributing to this project can be found in Contributing Setup.
License
Distributed under the MIT License. See LICENSE.md
for more information.
Support
This contribution has Full Support.
See SUPPORT.md
for more information.
For any security issues see SECURITY.md
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- AutoMapper (>= 13.0.1)
- kentico.xperience.aspnetcore.webapp (>= 13.0.131)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 6.0.27)
- Swashbuckle.AspNetCore (>= 6.5.0)
- System.IdentityModel.Tokens.Jwt (>= 6.35.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.2 | 40 | 11/27/2024 |
1.2.1 | 48 | 11/26/2024 |
1.2.0 | 83 | 10/22/2024 |
1.1.1 | 94 | 9/26/2024 |
1.1.0 | 120 | 8/21/2024 |
1.0.0 | 87 | 7/25/2024 |
0.1.0-prerelease-2 | 75 | 6/3/2024 |
0.1.0-prerelease-1 | 81 | 5/20/2024 |