Posts

Showing posts from September, 2019

CI/CD with TeamCity + Sitecore 9.2 + Unicorn

Image
In this post, I will tell you how to setup CI/CD for Sitecore 9.2 with TeamCity. Solution Update Prerequisites: - Sitecore 9.2 project/solution created Firstly you would want to be able to synchronize Sitecore items between environments. I choose to use Unicorn which can be installed to your solution via Nuget. The version that I am using are 4.1.1. You will need to install both Unicorn & Unicorn Core packages: You can notice that the target framework for Unicorn packages are .NET Framework 4.7.2 which I use for my Sitecore 9.2 solution. Assuming that you have already known how to use Unicorn, the only place that you need to change to enable automatic deployment of Sitecore items is in Unicorn.Configs.Default.config By default, the value is false, you will need to update the above value to true. However I would not want to touch the default config file. I will create a transformed configuration file and update this value. I prefer using profile configuration

Sitecore Commerce 8.1 - Column "XXX" referenced in Orders storage mapping file has different precision than the corresponding entry in the SQL schema.

Image
While working with Sitecore Commerce 8.1, it might come to a point where you need to customize the default database schema of Commerce Server to adapt with the business requirements. For example, a requirement from business to change the length of the ProductVariantId column in the table dbo.LineItems from transactions database to a suitable length like 255 characters: If you simply update the database schema and run the Storefront, you will hit this kind of error: Sitecore Commerce 8.1 - Column "XXX" referenced in Orders storage mapping file has different precision than the corresponding entry in the SQL schema. The reason is, in order for the Storefront and the Commerce Server to understand each other, there must be some kind of contract/mapping that both agree on. That mapping is defined in the file OrderObjectMappings.xml located in the Storefront root folder. To fix this error, locate the file and change the value in the column ProductVariantId to 255 as wel