Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
Experience Sitecore! | All posts tagged 'Commerce'

Experience Sitecore!

Martin Miles on Sitecore

Troubleshooting Solr populate schema for Sitecore Commerce 9.0 update 3 installation

I was installing Sitecore Commerce 9.0 update 3 and after a long successful run, it broke out with an error saying that Solr fails to populate schema.
After digging out, I found out that this issue is coming from Sitecore-commerce-solr.json has capitalized argument Name that is further concatenated with other arguments into a URL: 


where it should be with lower case 'n' instead:


As I later cleared up from Sitecore, the issue comes from using SIF 2.0 for installing XC 9.0 update 3, which is not supported -we should use SIF 1.2.1 instead. However, changing these configuration json file arguments to lowercase make the trick work.

Fixing issues preventing one having solution with SXA 1.8 along with Sitecore XP 9.0 update 2

I was very anticipating to upgrade my solution to recently released XP 9.1 with SXA 1.8 and all its great features, however, I got a dependency on Sitecore Commerce, which hasn't (yet) updated to 9.1. Got nothing to do with that, but just wait for a month or so until XC 9.1 is out...

But wait, why not just update at least SXA to version 1.8 meanwhile? SXA 1.8 comes for both versions for 9.1 and 9.0 which means - in two runtimes .NET 4.7.1 and .NET 4.6.2 correspondingly. Done, upgraded. SXA 1.8 works well on top of clean Sitecore 9.0 update 2 instance for me.

But when it came to updating NuGet packages in my solution, I was unable to do so because NuGet packages for my version for some reason demand .NET 4.7.1:

And that is my error:

Package Sitecore.XA.Feature.CreativeExchange 3.8.0 is not compatible with net462 (.NETFramework,Version=v4.6.2) / win-x86. Package Sitecore.XA.Feature.CreativeExchange 3.8.0 supports: net471 (.NETFramework,Version=v4.7.1)

Version 3.8.0 is the correct version of SXA 1.8 for 9.0 and it should support .NET 4.6.2, not 4.7.2. Version of SXA 1.8 for 9.1 has number 4.8.0 and that one indeed supports 4.7.1 runtime.

Since I cannot do anything about NuGet feeds, I turned back to the old lib\LocalRepository folder in my solution, simply copying all the required SXA 1.8 libraries from instance webroot (where I have SXA 1.8 working with clean 9.0 update instance) and referencing them instead from affected projects. 

That did me a job for the moment. I will either update to the NuGets once it is fixed with the correct version or upgrade the entire solution to 9.1 when XC 9.1 is out, whatever comes earlier.

Extracting package installation functionality out of Sitecore Commerce 9 SIF

In one of my previous posts, I've explained how Install-SitecoreConfiguration works in SIF and how to use it for package installation.

As time passed, more and more functionality got natively embedded into SIF, that included some useful things such as config transformations, publishing, rebuilding indexes, and of course, packages/modules installation. I decided to inspect what actually went into the platform and extracted this functionality out of Commerce product for those who want to benefit from package installations with SIF bit does not want to bother with XC9.

So, actually, there is not a big change compared with my previous post. On the lower level, there is still a temporal folder being exposed and *.aspx page placed for actual job to be done. The good thing is that plenty of that functionality now supported out of the box

For legal reasons I cannot include downloadable ready to use package, since the code and scripts belong to Sitecore who only can share it. Instead I will tell you how you can make it on your own copy of Sitecore Commerce 9.0 update 2.

You'll need three parts - Configuration, Modules and SiteUtilityPages, all carefully from within SIF.Sitecore.Commerce.1.2.14 folder:

  • Configurations (json files) taken out of Configuration\Commerce\Master_SingleServer.json and Configuration\SitecoreUtilities\InstallModule.json
  • Then you'll need three modules from Modules folder: InstallSitecoreConfiguration, ManageCommerceService, SitecoreUtilityTasks
  • Also you need SiteUtilityPages folder with InstallModules.aspx file within

If you do not keep a structure as from Commerce Installer (as didn't I) - please make adjust paths of dependencies correspondingly.

Last but not the least, you need to modify main Deploy-Sitecore-Commerce.ps1 PowerShell script, removing everything apart from package installation out of it. I renamed it into Install.ps1 and here is what I end up with:

		[string]$SiteName = "",	           # your sitecore instance name
		[string]$ModulePath = "p:\PowerShell"   # path to the module to be installed

$global:DEPLOYMENT_DIRECTORY=Split-Path $MyInvocation.MyCommand.Path
$modulesPath=( Join-Path -Path $DEPLOYMENT_DIRECTORY -ChildPath "Modules" )
if ($env:PSModulePath -notlike "*$modulesPath*")
    $p = $env:PSModulePath + ";" + $modulesPath

$params = @{
		Path = Resolve-Path '.\Configuration\Master.json'	
		SiteName = $SiteName
		InstallDir = "$($Env:SYSTEMDRIVE)\inetpub\wwwroot\$SiteName"		
		SiteUtilitiesSrc = ( Join-Path -Path $DEPLOYMENT_DIRECTORY -ChildPath "SiteUtilityPages" )	

		ModuleFullPath = Resolve-Path -Path  $ModulePath

Install-SitecoreConfiguration @params

and below there is my tree structure:

There are two parameters to be configured for Install.ps1 script to run:

In case you are working outside of inetpub\wwwroot folder, please also adjust the path for InstallDir variable.

Hope this helps your DevOps!

Passed! Sitecore Commerce 9 certification training and exam

Today I am proud to be one of the first folks globally who managed to pass Sitecore Commerce 9 exam after the eLearning course.

There are 50 questions in total anв you need to get 80% of correct answers (I managed to get 88%) in order to pass. All these questions are split into these categories (but not only):

  • Sales
  • BusinessTools
  • Sitecore Commerce
  • Features
  • Catalog
  • Pricing
  • App-Price-Cards
  • Inventory
  • Modify-Sellable
  • Customers
  • Profiles
  • Conv-Cart
  • Mang-Order
  • App-Coup
  • Conf-Coup
  • Create-Coup
  • Commerce EngRole
  • CommerceEngine
  • CommerceEngPlugin
  • Security
  • SDK
  • Nuget
  • SXA
  • Search
  • Navigation
  • Cart
  • Entitlement
  • Fulfilment
  • Payment
  • Orders
  • Plugins
  • RulesI

For preparation, I was guided by the materials from this StackExchange answer:

Happy learning!

Troubleshooting Sitecore Commerce 9 installation

While installing Sitecore Commerce I came across several blockers I had to sort out in:

  1. SIF
  2. Business Tools
  3. Storefront

1. You are getting 500.19 error during SIF. Other people who came across advice that you are to install ASP.NET Core 2. That's correct, as Commerce micro-services utilize .NET core, but not everything. There was a strong assumption of something missing from IIS or being mis-configured, so in my case it was this component unchecked:

Also, keep in mind you must have URL-Rewrite module installed (the easiest way is: choco install urlrewrite).

Another non-critical error I am getting from time to time is "The service cannot accept control messages at this time". IIS does respond at the moment - you may run iisreset and try warm it up by hitting URL manually in browser. Then repeat SIF deploy.

If SIF is complaining about duplicate certificates, you may need to delete those from Microsoft Management Console (MMC). In order to do that, click Start button, then type in mmc and hit enter. Once there, File - Add/Remove Snap-ins and select Certificates, as on screenshot below:

One more error from SIF: "Error: Unable to add user SITECOREDEV\WindowsUserName. Details: Database 'sc902com_Core' does not exist. Make sure that the name is entered correctly." In that case, ensure you're referencing correct database name for SitecoreCoreDbName variable (line 29 of default deploy script)

2. Running Business Tools may bring an error. In some previous versions Business Tools desktop icon was referencing invalid port, so make sure it is 4200 (by default). You can do that by changing Link field for Business Tools launchpad icon, as you usually do in corу database (item path: /sitecore/client/Applications/Launchpad/PageSettings/Buttons/Commerce/BusinessTools)

While running Business Tools, if you may see to following error:

The error means your browser needs a security exception for self-signed certificate, no worries - that's only for localhost and needs to be done once. Just open a new browser tab and follow to localhost:5000, confirming security exception, as prompted.

3. Once you have successfully installed Sitecore Commerce, you try to access storefront. So you hit URL in browser ( and ... see default Sitecore home page. Why?

The first assumption coming into one's mind is that since storefront is running on top of SXA - you should configure the hostname at HostName field of /sitecore/content/Sitecore/Storefront/Settings/Site Grouping/Storefront item. But wait! is the default value and already presents there. Does it work now? Nope ...

Firstly, try open storefront in Experience Editor (from master database). If you see the right storefront - just re-publish site, and update indexes - it will work from web database then. But if not - the answer is different: it appeared that my current partner's license does not include SXA. Not obvious, but when you're out of license - storefront default to Home page rather than notify you re. that error.

Remember, that you may apply for a developer trial license valid for two month that will include all the features of Sitecore, including SXA and JSS.