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
- 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.2 Initial Release
- Habitat Home Platform
Step-by-step Guide
- 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
- 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
- adjust the appropriate value in \src\Project\Global\code\App_Config\Include\Project\z.DevSettings.config
- launch PowerShell as an administrator
- change directory to D:\Projects\HHP
- execute .\build -Target “Quick-Deploy”
- execute .\build -Target “Apply-DotnetCore-Transforms”
- otherwise, you may get the following error An error occurred when executing task ‘Turn-On-Unicorn’ later
- download or clone the git repo from Habitat Home Commerce to D:\Projects\HHC
- 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\config.json
- \src\Project\HabitatHome\engine\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json
- \deploy-commerce-engine.ps1
- \items\Project\HabitatHome\Commerce.BusinessTools.URI\BusinessTools.yml
- let’s deploy the solution
- launch PowerShell as an administrator
- change directory to D:\Projects\HHC
- execute .\build.ps1 -Target Initial
- 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 D:\Projects\HHC
- execute .\deploy-commerce-engine.ps1 -Boostrap -Initialize
- hopefully everything runs well and then you would see something like this
- 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
- my suggestion is to add “C:\Program Files\Redis” to Windows Path variable and then redo this step
- open a browser and then navigate to https://hhc920.local/, you would see something like this after adding some products to cart successfully
- 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
- 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
- access /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/HabitatHome/Catalog Configuration
- ensure to uncheck the checkbox Use Direct Navigation
Note: some known issues
- Invoke-RestMethod: The remote server returned an error: (500) Internal Server Error
- my suggestion: ensure the engine suffix correct in deploy-commerce-engine.ps1 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_Sc920.local\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.2.0 Demo – Habitat Home Commerce – Step by step Setup Guide”