Kentico.Xperience.StoreApi 0.1.0-prerelease-1

Prefix Reserved
This is a prerelease version of Kentico.Xperience.StoreApi.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Kentico.Xperience.StoreApi --version 0.1.0-prerelease-1                
NuGet\Install-Package Kentico.Xperience.StoreApi -Version 0.1.0-prerelease-1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kentico.Xperience.StoreApi" Version="0.1.0-prerelease-1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kentico.Xperience.StoreApi --version 0.1.0-prerelease-1                
#r "nuget: Kentico.Xperience.StoreApi, 0.1.0-prerelease-1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Kentico.Xperience.StoreApi as a Cake Addin
#addin nuget:?package=Kentico.Xperience.StoreApi&version=0.1.0-prerelease-1&prerelease

// Install Kentico.Xperience.StoreApi as a Cake Tool
#tool nuget:?package=Kentico.Xperience.StoreApi&version=0.1.0-prerelease-1&prerelease                

Xperience by Kentico - KX 13 E-Commerce integration

Kentico Labs CI: Build and Test

Description

Repository contains solution with Xperience By Kentico integration to Kentico Xperience 13 E-Commerce features to create E-Commerce solution on XByK. Currently there are 2 solutions:

  • Kentico.Xperience.K13Ecommerce.sln
    • It shows the possibility of XbyK integration on Kentico 13 E-Commerce solution.
    • Consists of these parts:
      • Library for Kentico 13 that exposes a REST API for an E-Commerce site (Kentico.Xperience.StoreApi).
      • Library for XbyK connecting to the REST Store API running under Kentico 13 (Kentico.Xperience.K13Ecommerce)
      • Razor Class Library for selector components (Kentico.Xperience.Store.Rcl)
      • Sample Dancing Goat sites
        • DancingGoat.csproj - XbyK Dancing Goat 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 with configured Store API to show you how you can setup REST Store API on you own KX 13 e-commerce solution
  • Kentico.Xperience.K13Ecommerce.Libs.sln
    • Contains only libraries without sample sites

Solution covers several scenarios according to the complexity of integration between XByK and KX 13:

  • Product listing widget example
    • Used to display products directly from the KX 13, purchase itself still takes place on Kentico 13
  • Full scale e-commerce solution
    • Product data (with variants and images) are synchronized to Content hub (can be turned off)
    • Product listing, detail and checkout process is placed on XbyK (shopping cart is calculated still on KX 13)
    • Linking products to categories in Pages channels needs to be done manually from Content hub. Page types are prepared to CI restore, details info in this section of User Guide.

Screenshots

Cart content Products in content hub

Library Version Matrix

Summary of libraries which are supported by the following versions Xperince by Kentico / Kentico Xperience 13

Kentico Xperience 13 E-Commerce integration

Library Xperience Version Library Version
Kentico.Xperience.Ecommerce.Common >= 29.0.1 1.0.0
Kentico.Xperience.K13Ecommerce >= 29.0.1 1.0.0
Kentico.Xperience.Store.Rcl >= 29.0.1 1.0.0
Kentico.Xperience.StoreApi >= 13.0.131 1.0.0

Dependencies

Kentico 13 E-Commerce

Xperience by Kentico application:

Kentico Xperience 13 application (or standalone API app):

Package Installation

Kentico Xperience 13 E-Commerce integration

Add these packages to your XbyK application using the .NET CLI

dotnet add package Kentico.Xperience.K13Ecommerce
dotnet add package Kentico.Xperience.Store.Rcl

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 E-Commerce integration

First setup your Kentico 13 ASP.NET Core application:

  1. Setup 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": "********************"
  }
}
  1. 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();
}

Then setup your Xperience By Kentico application

  1. 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,
    "ProductSyncInterval": 10
  }
}
  1. Add K13Ecommerce library to the application services
// Program.cs

// Registers Kentico Store API and services for e-commerce support
builder.Services.AddKenticoStoreServices(builder.Configuration);
  1. For most simple scenario: copy product listing widget from Dancing Goat example project to your project and configure properties to display products from Kentico 13. Sample widget is located here.
  2. For more complex scenario with full e-shop, you can inspire how Dancing Goat sample Store on XbyK is implemented. Check Usage guide for detailed instructions how to configure categories, products and cart steps.
  3. 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
  1. 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 Kentico Labs limited support.

See SUPPORT.md for more information.

For any security issues see SECURITY.md.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 28 11/27/2024
1.2.1 45 11/26/2024
1.2.0 81 10/22/2024
1.1.1 92 9/26/2024
1.1.0 118 8/21/2024
1.0.0 85 7/25/2024
0.1.0-prerelease-2 75 6/3/2024
0.1.0-prerelease-1 81 5/20/2024