Setting up Multiple Stores
With Ucommerce comes the ability to have multiple stores configured for your site. Often this is also refered to as a multi-channel solution. This is a useful tool when you want to differ the different stores that your clients are viewing. You may want to do that if you want customers from Denmark to see the danish store and customers from UK to see the UK store. This could also make sence if you have different brands than needs different presentation.
Setting up a Hostname for Your Site
Ucommerce leverages the different capabilities from the CMS you're using and let them handle what they're good at - structuring the site. This means that any hostname / domain you want to use should be configured in the CMS.
For Umbraco you have to assign a host name and culture by rightclicking a node in the content tree and click "manage hostnames".
For Sitecore you have to configure the domain, the node and the language under the Sites node in web.config
How to tie together a Hostname and a Store
Now that you've configured the Domain in the CMS, Ucommerce has a service that can resolve all the configured hostnames for you to select for the individual store.
All there's left to do is select from a drop down on the individual store.

Now you've tied the store together with the domain and thereby also the language for the site/store. Your store will now automatically be resolved in our context based on what domain your client is viewing your page by.
Overriding the Store Resolver
The default way of resolving what store we're currently in, is as described by domain. If you wish to override that behaviour, you must extend the method CurrentCatalogGroup on the CatalogContext. If you're interested in how to do so, please refer to Override default behaviour in the APIs
Summary
In this article we've learned how to:
- Configure a store by domain resolved from the CMS.
- Override the default way of resolving a store if by domain is not sufficient for your solution.