You’re a Sitecore developer and want to know how to implement the website(s) using Sitecore Experience Accelerator 1.8 Update 1 (aka SXA 1.8.1) on Sitecore Experience Platform 9.1 Update 1 (aka Sitecore XP 9.1.1) + Sitecore Experience Commerce 9.1 Initial Release (aka Sitecore XC 9.1.0) and following Helix principles.
If that is the case, you should set up Sitecore demo – Habitat Home Commerce – on your machine so that you’re able to play around with the Sitecore solution example and then learn something.
Setup Preresiquites
- Windows 10
- Visual Studio 2017 (version 15.7 or later)
- Note: Visual Studio 2017 Version 15.7 and later supports migrating a project from the packages.config management format to the PackageReference format, click here to learn more about it
- Sitecore Experience Commerce 9.1 Initial Release
- Habitat Home Platform
Step-by-step Guide
- install a fresh Sitecore Commerce 9.1 Initial Release
- Note 1: Sitecore instance name should be habitathome.local and certificate for the Sitecore Commerce Engine should be issued to habitathome.local as well in this installation guide
- Note 2: for a better installation, we should go with Sitecore Powershell Extensions version 5.0 rather than version 4.7.2
- download and then deploy Habitat Home Platform 9.1.1 to Sitecore instance habitathome.local
- we should adjust the appropriate values in cake-config.json before building and deploying it
- launch PowerShell as an administrator
- change directory to \Sitecore.HabitatHome.Platform
- execute .\build -Target “Quick-Deploy”
- download or clone the git repo from Habitat Home Commerce
- Note: I don’t want to use the default settings so I need to adjust the appropriate values in the following files:
- \cake-config.json
- \src\Project\HabitatHome\website\App_Config\Include\Project\z.HabitatHome.Commerce.Website.DevSettings.config
- \src\Project\HabitatHome\engine\wwwroot\bootstrap\Global.json
- \src\Project\HabitatHome\engine\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json
- \deploy-commerce-engine.ps1
- let’s deploy the solution
- launch PowerShell as an administrator
- change directory to Habitat Home Commerce directory
- execute .\build.ps1 -Target Initial
- hopefully everything runs well and then you would see something like this
- Note: you may get the following error while build task “Sync-Unicorn” is publishing items in queue to web , just execute .\build.ps1 -Target Initial one more time to resolve it
- let’s deploy the engine
- launch PowerShell as an administrator
- change directory to Habitat Home Commerce directory
- execute .\deploy-commerce-engine.ps1 -Boostrap -Initialize
- hopefully everything runs well and then you would see something like this
- open a browser and then navigate to https://habitathome.local, you would see something like this after adding some products to cart successfully
Note: some known issues
- Invoke-RestMethod: The remote server returned an error: (500) Internal Server Error
- open the log file you would see something like this
-
ERROR Connection id “”0HLE4OSSCC354″”, Request id “”0HLE4OSSCC354:00000001″”: An unhandled exception was thrown by the application.Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery cookie “.AspNetCore.Antiforgery.cf4m-F-R1lY” is not present.
- my suggestion: ensure the engine suffix correct in deploy-commerce-engine.ps1 and then perform Step 6 again
- Cleaning Environments: HTTP Error 502.5
- open Windows Event Viewer, you should see something like this
- my suggestion: probably ASP.NET Core module was not installed correctly on your machine, you should try to install the latest version of .Net Core 2.1 Runtime (v2.1.3) and then perform Step 6 again
- The underlying connection was closed: Could not established trust relationship for the SSL/TLS secure channel
- my suggestion 1: ensure that the certificate thumbprint is the same in both \App_Config\Include\Y.Commerce.Engine\Sitecore.Commerce.Engine.Connect.config and \CommerceOps_Sc910\wwwroot\config.json and then perform Step 6 again
- my suggestion 2: ensure that $CommerceOpsPort parameter is correct in deploy-commerce-engine.ps1 and then perform Step 6 again
Got issues?
Please send your issues (with screenshots if possible) to viet.hoang.sitecore@gmail.com so that I have a chance to understand your problem and be able to suggest the solution.
Happy Sitecore Demo Installation!
4 thoughts on “Sitecore XC 9.1.0 Demo – Habitat Home Commerce – Step by step Setup Guide”