Installing uCommerce on a content delivery server is pretty simple, nothing new, just install the package on Sitecore and done.

Perfect! Everything is up and running, but what if now you follow the standard procedure of "security hardening" for a CD server?

One of the usual steps is to remove any link to the master database. You do it, and nothing happens. Sometimes uCommerce must read items directly from the Sitecore tables and by default it reads it from the master database. One example is the confirmation emails; uCommerce will fail with the error: Could not find configuration node: databases/database[@id='master']

You can control the particular database uCommerce reads the items from by changing the property "nameofcontentdatabase" of the component "SitecoreContext". By default, this configuration is stored in the configuration file shell.config. However, uCommerce recommends to apply those changes in the custom.config file instead of modifying any uCommerce file directly.

How to install uCommerce? Simple:

  • Copy the following code into custom.config
<!-- Services --> <component id="SitecoreContext" service="UCommerce.Sitecore.ISitecoreContext, UCommerce.Sitecore" type="UCommerce.Sitecore.SitecoreContext, UCommerce.Sitecore"> <parameters> <backEndDomainName>sitecore</backEndDomainName> <nameOfContentDatabase>web</nameOfContentDatabase> </parameters> </component>
  • Restart your application
In my opinion, we should always apply this change as our users are expecting to be able to edit in the master database without those changes being applied on the front-end. Additionally, in scenarios such as this, the email will be generated with the content from master which is not the expected behaviour.

Author bio

Vicent Galiana
Vicent Galiana
Solutions Architect
Putting blocks together to make things easier, creating those missing clever parts which make it possible. That's my passion, that's my hobby, that's my job. It's about keeping up to date with current tools, and figuring out how to glue them together to solve client's challenges.


comments powered by Disqus

Related Articles

Sign up to our ClearThought newsletter

Get inspired and learn something new by subscribing to our FREE newsletter. It’s full of ClearPeople's thought-leadership whitepapers, blogs, events, and much more. We promise to not use your email for spam.

Closing this message and/or accessing our website tells us you are happy to receive all cookies on the ClearPeople website.
However, if you would like to, you can change your cookies settings at any time.