deployment · installation

Sitecore XC 9.1.0 Demo – Habitat Home Commerce – Step by step Setup Guide

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

Step-by-step Guide

  1. 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
  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
    • hhc910_1
    • launch PowerShell as an administrator
    • change directory to \Sitecore.HabitatHome.Platform
    • execute .\build -Target “Quick-Deploy”
    • hhc910_2.png
    • hhc910_3
  3. download or clone the git repo from Habitat Home Commerce
  4. 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
    • hhc910_4
    • \src\Project\HabitatHome\website\App_Config\Include\Project\z.HabitatHome.Commerce.Website.DevSettings.config
    • hhc910_7.png
    • \src\Project\HabitatHome\engine\wwwroot\bootstrap\Global.json
    • hhc910_18
    • \src\Project\HabitatHome\engine\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json
    • hhc910_9
    • \deploy-commerce-engine.ps1
    • hhc910_15
  5. let’s deploy the solution
    • launch PowerShell as an administrator
    • change directory to Habitat Home Commerce directory
    • execute .\build.ps1 -Target Initial
    • hhc910_5
    • hopefully everything runs well and then you would see something like this
    • hhc910_6.png
    • 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
    • hhc910_14.png
  6. let’s deploy the engine
    • launch PowerShell as an administrator
    • change directory to Habitat Home Commerce directory
    • execute .\deploy-commerce-engine.ps1 -Boostrap -Initialize
    • hhc910_16
    • hopefully everything runs well and then you would see something like this
    • hhc910_17
  7. open a browser and then navigate to https://habitathome.local, you would see something like this after adding some products to cart successfully
    • hhc910_13

 

Note: some known issues

  1. Invoke-RestMethod: The remote server returned an error: (500) Internal Server Error
    • hhc_6
    • 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
  2. Cleaning Environments:  HTTP Error 502.5
    • hhc_12
    • open Windows Event Viewer, you should see something like this
    • ghhc_13
    • 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
  3. The underlying connection was closed: Could not established trust relationship for the SSL/TLS secure channel
    • hhc910_10
    • 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
    • This slideshow requires JavaScript.

    • 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!

Advertisement

4 thoughts on “Sitecore XC 9.1.0 Demo – Habitat Home Commerce – Step by step Setup Guide

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.