installation

Sitecore XC 9.2.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.9 (aka SXA 1.9.0) on Sitecore Experience Platform 9.2 Initial Release (aka Sitecore XP 9.2.0) +  Sitecore Experience Commerce 9.2 Initial Release (aka Sitecore XC 9.2.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.2 Initial Release
    • Note: Sitecore instance name should be hhc920.local and certificate for the Sitecore Commerce Engine should be issued to hhc920.local as well in this installation guide
  2. deploy Habitat Home Platform 9.2.0 to Sitecore instance hhc920.local
    • download or clone the git repo from Habitat Home Platform 9.2.0 to D:\Projects\HHP
    • adjust the appropriate values in cake-config.json
    • hhc920_1
    • adjust the appropriate value in \src\Project\Global\code\App_Config\Include\Project\z.DevSettings.config
    • hh920_7
    • launch PowerShell as an administrator
    • change directory to D:\Projects\HHP
    • execute .\build -Target “Quick-Deploy”
    • hhc920_7
    • hhc920_8
    • execute .\build -Target “Apply-DotnetCore-Transforms”
    • hhc920_15
    • hhc920_16
    • otherwise, you may get the following error An error occurred when executing task ‘Turn-On-Unicorn’ later
    • hhc920_10
  3. download or clone the git repo from Habitat Home Commerce to D:\Projects\HHC
  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
    • hhc920_2
    • \src\Project\HabitatHome\website\App_Config\Include\Project\z.HabitatHome.Commerce.Website.DevSettings.config
    • hhc920_3
    • \src\Project\HabitatHome\engine\wwwroot\bootstrap\Global.json
    • hhc920_4
    • \src\Project\HabitatHome\engine\wwwroot\config.json
    • hhc920_23
    • \src\Project\HabitatHome\engine\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json
    • hhc920_5
    • \deploy-commerce-engine.ps1
    • hhc920_12
    • \items\Project\HabitatHome\Commerce.BusinessTools.URI\BusinessTools.yml
    • hhc920_22.png
  5. let’s deploy the solution
    • launch PowerShell as an administrator
    • change directory to D:\Projects\HHC
    • execute .\build.ps1 -Target Initial
    • hhc920_9
    • hhc920_18.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
    • hhc920_17.png
  6. let’s deploy the engine
    • launch PowerShell as an administrator
    • change directory to D:\Projects\HHC
    • execute .\deploy-commerce-engine.ps1 -Boostrap -Initialize
    • hhc920_13
    • hopefully everything runs well and then you would see something like this
    • hhc920_14.png
    • Note: you may get the following error redis-cli : The term ‘redis-cli’ is not recognized as the name of a cmdlet, function, script file, or operable program
    • hhc920_11
    • my suggestion is to add “C:\Program Files\Redis” to Windows Path variable and then redo this step
  7. open a browser and then navigate to https://hhc920.local/, you would see something like this after adding some products to cart successfully
    • hhc920_19
    • Note: you may have to log into https://hhc920.local/sitecore/ and do the following ones:
      • access /sitecore/content/Habitat SXA Sites/Habitat Home/home/Catalogs
      • check Habitat_Master catalog if NOT YET
      • hhc920_21.png
      • make sure that Solr is running properly by rebuilding the search indexes in the Sitecore client (Control Panel =Indexing Manager) if not yet
        • select the checkbox sitecore_master_index and then click Rebuild button
      • hit Refresh Commerce Cache in the COMMERCE tab of Content Editor
      • ghhc_9
      • access /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/HabitatHome/Catalog Configuration
      • ensure to uncheck the checkbox Use Direct Navigation
      • hhc920_20.png

 

Note: some known issues

  1. Invoke-RestMethod: The remote server returned an error: (500) Internal Server Error
    • hhc_6
    • my suggestion: ensure the engine suffix correct in deploy-commerce-engine.ps1 and then perform Step 6 again
  2. 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_Sc920.local\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!

3 thoughts on “Sitecore XC 9.2.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 )

Google photo

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

Twitter picture

You are commenting using your Twitter 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.