Installing Sitecore Commerce 8.2.1 – Part 2

      Comments Off on Installing Sitecore Commerce 8.2.1 – Part 2

In the last post, I covered how to install the core components of Sitecore Commerce 8.2.1. This post will cover the installation of the reference storefront.

Install storefront files and items

If you are installing the reference storefront, install the following modules and packages:

  • Adventure Works


You will most likely get an error after installing the last package.  This is expected.  After the initialization process, the error should go away.

Initializing the site

As in the previous post the user that runs the following commands must be a local administrator and a sysadmin on the database server

  1. Open a PowerShell console.  You must have PowerShell 4.0 or greater
  2. Run Set-ExecutionPolicy Unrestricted and select Y
  3. Change the directory to your website root with the command.  For example:cd c:\inetpub\sc82u3\Website
  4. Run Initialize-CSSite. You will see ouput indicating that databases are being created, resources are being added to the commerce site, and the runtime user is being added to various database roles
  5. Run the following two commands to create the web services for the legacy Commerce Server components.  The CSServices website and app pool should have been created in the previous post.  The Identity and Password should be for the runtime user created in the previous post.
    • New-CSWebService -Name "CFSolutionStorefrontsite" -Resource Catalog -IISSite "CSServices" -AppPool "CSServices" -Identity 'RuntimeUser' -Password 'YourPassword'
    • New-CSWebService -Name "CFSolutionStorefrontsite" -Resource Profiles -IISSite "CSServices" -AppPool "CSServices" -Identity 'RuntimeUser' -Password 'YourPassword'
  6. Run the following commands to assign the runtime user to catalog and profile administrator roles in the associated authorization store xml files.  You could also do this manually with Authorization Manager (AzMan).  Be sure to adjust the path to the xml files according to the location where you created the CSServices site.
    • Grant-CSCatalogWebServicePermissions –File "C:\inetpub\csservices\CFSolutionStorefrontsite_CatalogWebService\CatalogAuthorizationStore.xml" -Identity "RuntimeUser" -Role "Administrator"
    • Grant-CSProfilesWebServicePermissions –File "C:\inetpub\csservices\CFSolutionStorefrontsite_ProfilesWebService\ProfilesAuthorizationStore.xml" -Identity "RuntimeUser" -Role "ProfileAdministrator"
  7. Optionally, run the following command to set the inventory subsystem to display out of stock SKUs
    • Set-CSSiteResourceProperty -Name "CFSolutionStorefrontsite" –Resource "Inventory" -PropertyName "f_display_oos_skus" -PropertyValue $true
  8. Open a new command prompt or type ‘cmd’ in the PowerShell colsole you have open and enter the following commands
    • cd "C:\Program Files (x86)\Commerce Server 11\Tools"
    • ProfileKeyManager.exe /kn /o "c:\profileEncryptionKeys.xml" /f
    • ProfileKeyManager.exe /ke /kf "c:\profileEncryptionKeys.xml" /reg HKEY_LOCAL_MACHINE\SOFTWARE\CommerceServer\Encryption\Keys\CFSolutionStorefrontSite /f
  9. Deploy the profile database dacpac by running the following command in a command prompt on a machine that has SQL Server Management Studio installed:
    • "C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\SqlPackage.exe" /Action:Publish /SourceFile:"<path to extracted installation files>\Database\Profiles\Commerce.Storefront.ProfileDatabase.dacpac" /TargetDatabaseName:<YourSiteName>_profiles /TargetServerName:"<SqlServerInstanceName>"
  10. Reinstall

I think this is it for the reference storefront.  I say “I think” because an argument could be made that the Commerce Engine provided in the SDK is a part of the reference storefront.  We’ll take a look at that in the next post.