deployment · installation

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

Recently, I’ve had a chance to play around with the installation of a new Sitecore demo – Habitat Home Commerce. Personally, it’s an interesting experience for me so I want to write it down for myself and for the Sitecore community. I do hope that it’s helpful for your own play.

Thanks Jean-François Larente for his prompt support so that I was able to overcome the problems quickly if any during the installation.

Update (07-Aug-2018): for Sitecore XC 9.0.2 demo, please navigate to this one

Setup Preresiquites

Step-by-step Guide

  1. install a fresh Sitecore Commerce 9.0 Update 1
    • Note: Sitecore instance name should be habitathome.local and certificate for the Sitecore Commerce Engine should be issued to habitathome.local in this installation guide
  2. deploy Habitat Home (version 9.0.1.9) to Sitecore instance habitathome.local
  3. download or clone the git repo from Habitat Home Commerce (version 9.0.1.9)
  4. restore all Node.js modules
    • run command line as Administrator
    • change directory to Habitat Home Commerce directory
    • execute npm install
    • ghhc_4.png
  5. Note: I don’t want to use the default settings so I need to adjust the appropriate values in the following files:
    • \gulp-config.js
      • hhc_11
    • \publishsettings.targets
      • hhc_10
    • \deploy-commerce-engine.ps1
      • ghhc_1
    • \src\Project\HabitatHome\engine\wwwroot\bootstrap\Global.json
      • ghhc_2.png
    • \src\Project\HabitatHome\engine\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json
      • ghhc_3
  6. open \HabitatHome.Commerce.sln with Visual Studio 2017
  7. deploy the solution
    • open Task Runner Explorer on View -> Other Window -> Task Runner Explorer
    • ghh_7
    • choose Solution ‘HabitatHome.Commerce’ from list, then click refresh button
    • from task list, double click on initial task to run it
    • ghhc_5
    • Note: for Visual Studio 2017 on your own machine, you might have to run gulp tasks via Command Prompt (run as Administrator)
  8. hopefully everything runs well and then you would see something like this
    • ghhc_6
  9. deploy the engine
    • launch PowerShell as an administrator
    • change directory to Habitat Home Commerce directory
    • execute .\deploy-commerce-engine.ps1 -Boostrap -Initialize
    • ghhc_7.png
    • hopefully everything runs well and then you would see something like this
    • ghhc_8
  10. open a browser and then navigate to https://habitathome.local, you would see something like this after adding some products to cart successfully
    • ghhc_10.png

 

Note: some known issues

  1. Visual Studio’s Task Runner: SyntaxError: Unexpected token
  2. 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 9 again
  3. Cleaning Environments:  HTTP Error 502.5
    • hhc_12
    • open Windows Event Viewer, you should see something like this
    • ghhc_13
    • my suggestions: probably ASP.NET Core module was not installed correctly on your machine, you should try to install the latest version of .NET Core 2.0 (Runtime) and then perform Step 9 again
  4. Empty strings are not allowed. Parameter name: value
    • ghhc_11
    • my suggestion:
      • log into https://habitathome.local/sitecore
      • 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
      • update Catalog to Habitat Master then save
      • ghhc_12
  5. Guid should contain 32 digits with 4 dashes
    • ghhc_15
    • my suggestion:
      • log into https://habitathome.local/sitecore
      • 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

 

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.0.1 Demo – Habitat Home Commerce – Step by step Setup Guide

  1. Hi Hoang!

    I admire the achievements that you have achieved so much.
    I also love sitecore and I’m learning more about sitecore. Do you have any book, slide or documents… for self-study of sitecore? Please share with me.

    Like

    1. Hi Thanh,

      Personally, I think that these ones below should be a good start:
      1) Professional Sitecore 8 Development: A Complete Guide to Solutions and Best Practices: https://www.amazon.com/Professional-Sitecore-Development-Solutions-Practices/dp/1484222911
      2) Unofficial Sitecore 8 Training Webinar Series: https://www.youtube.com/watch?v=W_9wDlg-GjU&list=PLadFm3AHiwR8AFQ23Zx59vaxrUSlfWGj6

      By the way, you should join Sitecore Slack: https://sitecorechat.slack.com/ (you can register here https://docs.google.com/forms/d/e/1FAIpQLScsJX9PC3m8u-labRn_BNnByR0aiAxPYowN-doed6_t45aPhg/viewform) or add your query if any to Sitecore StackExchange https://sitecore.stackexchange.com/

      There are many experienced Sitecore devs and Sitecore experts around the world are willing to give a hand on Sitecore Slack and Sitecore StackExchange.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

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.