First, we will create the second website (2nd store):

 
   - Go to C:\Program Files (x86)\Atomia
   - Copy Store folder to Store2 (or the name you prefer)
   - Open IIS and 'Add Website...'
     while creating website you'll need to specify
       * Site name, put whatever in this field
       * Physical path to website (which is in my case: 'C:\Program Files (x86)\Atomia\Store2')
       * Binding, here just select https for Type
       * Hostname (in my case 'store2.atomia.local')


Assuming, your hostname is resolvable when you hit 'store2.atomia.local' in browser you should get web page working.



Now, let's make 2nd store - the one we just created, use 2nd shop:


I'll assume you have created the second shop in admin panel which is not default one.

IMPORTANT: rename/name that shop to have the same name as the hostname of second store e.g. in my case that shop is called 'store2.atomia.local'


Now, open 'C:\Program Files (x86)\Atomia\Store2\Web.config' and in <unity> section you should have this two lines:


<alias alias="IShopNameProvider" type="Atomia.Store.PublicBillingApi.IShopNameProvider, Atomia.Store.PublicBillingApi" />
<alias alias="DomainShopNameProvider" type="Atomia.Store.PublicBillingApi.DomainShopNameProvider, Atomia.Store.PublicBillingApi" />


Set `IShopNameProvider` to be implemented by `DomainShopNameProvider` instead of `DefaultShopNameProvider` by changing line in the unity <container> sub-section:


<register type="IShopNameProvider" mapTo="DefaultShopNameProvider" />


to this one:


<register type="IShopNameProvider" mapTo="DomainShopNameProvider" />


After editing, your <unity> section should look like this:

 

  <unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
    <alias alias="IProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.IProductsProvider, Atomia.Web.Plugin.ProductsProvider" />
    <alias alias="PublicApiShopProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.PublicApiShopProductsProvider, Atomia.Web.Plugin.ProductsProvider" />
    <alias alias="AtomiaBillingPublicService" type="Atomia.Web.Plugin.OrderServiceReferences.AtomiaBillingPublicService.AtomiaBillingPublicService, Atomia.Web.Plugin.OrderServiceReferences" />
    <alias alias="ICachingManager" type="Atomia.Web.Plugin.ProductsProvider.ICachingManager, Atomia.Web.Plugin.ProductsProvider" />
    <alias alias="HttpApplicationStateCacheManager" type="Atomia.Web.Plugin.HostingProducts.Helpers.HttpApplicationStateCacheManager, Atomia.Web.Plugin.HostingProducts" />
    <alias alias="EntLibCachingManager" type="Atomia.Web.Plugin.ProductsProvider.EntLibCachingManager, Atomia.Web.Plugin.ProductsProvider" />
    <alias alias="IShopNameProvider" type="Atomia.Store.PublicBillingApi.IShopNameProvider, Atomia.Store.PublicBillingApi" />
    <alias alias="DomainShopNameProvider" type="Atomia.Store.PublicBillingApi.DomainShopNameProvider, Atomia.Store.PublicBillingApi" />

    <container>
      <register type="AtomiaBillingPublicService">
        <property name="Url" value="http://orderapi.atomia.local/AtomiaBillingPublicService.asmx" />
        <property name="Timeout" value="600000" />
      </register>
      <register type="EntLibCachingManager">
        <constructor>
          <param name="cacheManagerName" value="ProductsCache" />
        </constructor>
      </register>
      <register type="ICachingManager" mapTo="EntLibCachingManager" />
      <register type="IProductsProvider" mapTo="PublicApiShopProductsProvider">
        <constructor>
          <param name="publicService" />
          <param name="cachingManager" />
        </constructor>
      </register>
  <register type="IShopNameProvider" mapTo="DomainShopNameProvider" />
    </container>
  </unity>