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
- Windows 10
- Visual Studio 2017
- Sitecore Experience Commerce 9.0 Update 1
- Habitat Home Platform
Step-by-step Guide
- 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
- deploy Habitat Home Platform (version 9.0.1.9) to Sitecore instance habitathome.local
- Note 1: we don’t need to install the following Sitecore modules in this installation guide because they’re installed in Step 1
- Note 2: should run quick-deploy gulp task rather than default one
- download or clone the git repo from Habitat Home Commerce (version 9.0.1.9)
- restore all Node.js modules
- run command line as Administrator
- change directory to Habitat Home Commerce directory
- execute npm install
- 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
- \publishsettings.targets
- \deploy-commerce-engine.ps1
- \src\Project\HabitatHome\engine\wwwroot\bootstrap\Global.json
- \src\Project\HabitatHome\engine\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json
- \gulp-config.js
- open \HabitatHome.Commerce.sln with Visual Studio 2017
- deploy the solution
- open Task Runner Explorer on View -> Other Window -> Task Runner Explorer
- choose Solution ‘HabitatHome.Commerce’ from list, then click refresh button
- from task list, double click on initial task to run it
- Note: for Visual Studio 2017 on your own machine, you might have to run gulp tasks via Command Prompt (run as Administrator)
- hopefully everything runs well and then you would see something like this
- 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
- Visual Studio’s Task Runner: SyntaxError: Unexpected token
- my suggestion: have a look at https://stackoverflow.com/questions/45580456/visual-studio-task-runner-error-with-es6 in order to overcome the issue
- 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 9 again
- Cleaning Environments: HTTP Error 502.5
- open Windows Event Viewer, you should see something like this
- 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
- Empty strings are not allowed. Parameter name: value
- my suggestion:
- log into https://habitathome.local/sitecore
- hit Refresh Commerce Cache in the COMMERCE tab of Content Editor
- access /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/HabitatHome/Catalog Configuration
- update Catalog to Habitat Master then save
- Guid should contain 32 digits with 4 dashes
- 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
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!
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.
LikeLike
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.
LikeLike