How to change the Environment list displayed in Sitecore Commerce Business tools drop down

Every Sitecore Commerce installation creates a Business Tools instance:


Note that the above screen shot shows instances related to two different Sitecore Commerce installations.

 A full commerce installation usually has the Habitat and Adventureworks catalog/environment installed by default:
Note that since there are two Sitecore Commerce instances  running in my machine, you will see folders related to sc92comminstn6.local and sc92comminstn7.local interchangeably in the screen shots but, i guess the point is conveyed.

Also note that there is a difference between storefront and the environments as such. For instance, if you use $skipInstallDefaultStorefront = $true during installation,


The installation will skip the installation of just the storefront and so, you won't have a Storefront node in the content tree/application.

Although sc92comminstn6.local, doesn't have a storefront at this point, you can nevertheless create a brand new site and storefront by using the Sitecore wizard for creating a new tenant and then a site within.

While in case of the other instance - sc92comminstn7.local, $skipInstallDefaultStorefront was set to $true switch during installation and so, the storefront is installed by default -
Now, getting back on track, when I switched over to the business tools instance of sc92comminstn6.local named bizfx.sc9Instn6.com, i did not expect to see any references related to Habitat or Adventureworks but i was wrong, the business instance had references to those environments:
Adding on to the above point, although the Sitecore content tree doesn't display the storefront since it was skipped as part of the install, everything related to the two environments will be added to the file system. You can cross-verify by traversing the Environments folder for the corresponding instance and, you would see jsons related to both Adventureworks and Habitat.

So, in order to remove these references, open the Global.json file under the authoring instance web root -

The environment list in the json is what populates the drop down -
While creating a new environment for a new project, i will want to add my own environment name and get rid of the irrelevant ones but, for the time being, i will just remove one or two of the entries and see if that is reflected in the Bizfx interface dropdown. So, removed entries related to Adventure works, performed an iis reset and the entries related to Adventure works are not displayed anymore  -

Comments

Popular Posts