Akshay Sura - Partner
15 Jul 2019
Sitecore Experience Commerce 9.1 was released in April 2019 and runs on Sitecore 9.1 Update 1.
Make sure you have a valid working instance of Sitecore 9.1.1 running before we begin. Download the Sitecore Experience Commerce 9.1 Initial Release On Premises Packages for On Premise 2019.04-3.0.163 and the Installation Guide - On Premise using the link below:
Sitecore Experience Commerce 9.1 Initial Release
Having installed Sitecore Experience Commerce over 50 times and dealing with unexpected issues, I want to take care of a few housecleaning items before we begin out Commerce install.
SSL Certificate
To install an SSL cert on your Sitecore 9.1.1 instance, run the following commands (replace xp0.sc with your domain host): New-SelfSignedCertificate -DnsName xp0.sc -CertStoreLocation cert:\LocalMachine\My $sslPassword = ConvertTo-SecureString "P@ssw0rd" -Force -AsPlainText Export-PfxCertificate -Cert cert:\LocalMachine\My\FF0AC531A86BCFEA07D91D272393E81780C9EF4C -FilePath C:\xp0.pfx -Password $sslPassword
Import the generated PFX file into the Personal and Trusted Root Certification Authorities on your Local Computer Certificates
Identity Server
Since your identity server is installed as part of the Sitecore 9.1.1 install, before you install commerce, you need to add CORS endpoints to the config. Modify the C:\inetpub\wwwroot\XP0.identityserver\Config\production\Sitecore.IdentityServer.Host.xml file and add the config below in the AllowedCorsOrigins section.
<AllowedCorsOriginsGroup1>http://XP0.sc|https://XP0.sc</AllowedCorsOriginsGroup1><AllowedCorsOriginsGroup2>https://sxa.storefront.com|http://sxa.storefront.com</AllowedCorsOriginsGroup2>
Note that you will already have the AllowedCorsOriginsGroup1 node, you need to make sure the https version of your host name exists in there.
SXAStorefrontModuleFullPath is set as Resolve-Path -Path “..\Sitecore Commerce Experience Accelerator Storefront 1.*.zip” by default but the file name is Sitecore Commerce Experience Accelerator Storefront 2.0.181.zip. Watch out for this especially if you are leaving the Resolve-Path.
<item name="CreateDefaultStorefrontTenantAndSite" key="createdefaultstorefronttenantandsite" id="{6FEC77C8-00DC-4B7B-9597-82588616A1F2}" tid="{DD22F1B3-BD87-4DB2-9E7D-F7A496888D43}" mid="{00000000-0000-0000-0000-000000000000}" sortorder="300" language="en" version="1" template="powershell script" parentid="{330C8219-7B1C-455F-9D48-ADF58BEA15B9}" created="20190411T104541Z"><fields><field tfid="{BADD9CF9-53E0-4D0C-BCC0-2D784C282F6A}" key="__updated by" type="Single-Line Text"><content>sitecore\admin</content></field><field tfid="{8CDC337E-A112-42FB-BBB4-4143751E123F}" key="__revision" type="Single-Line Text"><content>0f12c57e-4cd5-4033-814a-6f188621d248</content></field><field tfid="{25BED78C-4957-4165-998A-CA1B52F67497}" key="__created" type="datetime"><content>20171206T090838Z</content></field><field tfid="{D9CF14B1-FA16-4BA6-9288-E8A174D4D522}" key="__updated" type="datetime"><content>20181031T095825Z</content></field><field tfid="{B1A94FF0-6897-47C0-9C51-AA6ACB80B1F0}" key="script" type="Multi-Line Text"><content>Import-Function Validate-PowerShell Test-PowerShell Import-Function New-Tenant Import-Function New-Site Import-Function Get-ValidSiteSetupDefinition $tenantRootPath = "/sitecore/content" $tenantName = "Sitecore" $siteName = "Storefront" $hostName = "sxa.storefront.com" $gridId = "{85E7A149-9009-43D8-96AC-58605ADE7777}" $wireFrameThemeId = "{3F46272C-F3B8-4913-8C00-3816B436A4D3}" $storefrontBrandedThemeId = "{48FFBFC8-E705-44E1-8ACD-6A714FFD09E3}" $doVerbose = $false Function CreateCXATenant
After
<item name="CreateDefaultStorefrontTenantAndSite" key="createdefaultstorefronttenantandsite" id="{6FEC77C8-00DC-4B7B-9597-82588616A1F2}" tid="{DD22F1B3-BD87-4DB2-9E7D-F7A496888D43}" mid="{00000000-0000-0000-0000-000000000000}" sortorder="300" language="en" version="1" template="powershell script" parentid="{330C8219-7B1C-455F-9D48-ADF58BEA15B9}" created="20190411T104541Z"><fields><field tfid="{BADD9CF9-53E0-4D0C-BCC0-2D784C282F6A}" key="__updated by" type="Single-Line Text"><content>sitecore\admin</content></field><field tfid="{8CDC337E-A112-42FB-BBB4-4143751E123F}" key="__revision" type="Single-Line Text"><content>0f12c57e-4cd5-4033-814a-6f188621d248</content></field><field tfid="{25BED78C-4957-4165-998A-CA1B52F67497}" key="__created" type="datetime"><content>20171206T090838Z</content></field><field tfid="{D9CF14B1-FA16-4BA6-9288-E8A174D4D522}" key="__updated" type="datetime"><content>20181031T095825Z</content></field><field tfid="{B1A94FF0-6897-47C0-9C51-AA6ACB80B1F0}" key="script" type="Multi-Line Text"><content>Import-Function Validate-PowerShell Test-PowerShell Import-Function New-Tenant Import-Function New-Site Import-Function Get-ValidSiteSetupDefinition $tenantRootPath = "/sitecore/content" $tenantName = "Sitecore" $siteName = "Storefront" $hostName = "sxa.storefront.com" $gridId = "{85E7A149-9009-43D8-96AC-58605ADE7777}" $wireFrameThemeId = "{3F46272C-F3B8-4913-8C00-3816B436A4D3}" $storefrontBrandedThemeId = "{48FFBFC8-E705-44E1-8ACD-6A714FFD09E3}" $doVerbose = $false Function Write-Progress { [CmdletBinding()] param( [Parameter(Mandatory = $false)] $Activity, [Parameter(Mandatory = $false)] $CurrentOperation, [Parameter(Mandatory = $false)] $Status, [Parameter(Mandatory = $false)] $PercentComplete, [Parameter(Mandatory = $false)] [switch]$Completed ) process { # do nothing } } Function CreateCXATenant
NOTE: #21, #22, #23 and #24 are for users who have modified their Sitecore 9.1.1 instance password to anything other than b.** In my case I opted for a random password be generated as part of the install, so I have no choice but to do the following few steps.
The install finally finished ;).
My blog post on Quickest way to install Sitecore 9.1.1 on a Developer Workstation.
If you have any questions or concerns, please get in touch with me. (@akshaysura13 on Twitter or on Slack).
Akshay is a nine-time Sitecore MVP and a two-time Kontent.ai. In addition to his work as a solution architect, Akshay is also one of the founders of SUGCON North America 2015, SUGCON India 2018 & 2019, Unofficial Sitecore Training, and Sitecore Slack.
Akshay founded and continues to run the Sitecore Hackathon. As one of the founding partners of Konabos Consulting, Akshay will continue to work with clients to lead projects and mentor their existing teams.
Share on social media