Skip to main content

Posts

Watch your minions!

We have a Sitecore Commerce 9.0.3 implementation where minions play a somewhat more significant role than they were probably initially designed for. They synchronize catalog with PIM , pricing with external price system, promotions with external marketing system, etc. One of the most important roles is pushing the queue of created orders to the fulfillment provider. Once the order volume passed the initial rate, the fulfillment provider started getting duplicate orders. This was somewhat random, and hard to catch. The duplicate orders would always be sent within less than a second from each other. The minion logs on our side would show no duplicate attempts to send anything, and the code itself made that impossible. To add to the mystery - rebooting the server would fix the issue but only until the next deployment. After much investigation and some lucky coincidence, we've found out the following: Authoring role would suddenly start running minions ; The minions in Authoring
Recent posts

What's in your cart?

Let's say, you've added product A to your shopping cart. Then you get back to the product details page and add product A again. What's going to happen? You will still have one line in your cart, but the quantity of product A will be equal two . This is a standard behavior of B2C shopping carts, including the Sitecore Commerce 9 ones. Now, imagine that your business processes require a bit more complicated scenarios, where you might want to actually create two lines in the cart, and avoid rolling them up into a single one. It is much more common than you might think. For example, you are buying two toasters of the same make and model, but you want only one of them gift-wrapped. Or you buy two pairs of glasses belonging to the same SKU, but you want to specify different prescriptions for them. Obviously, you do not want to roll them up under a single cart line. What does Sitecore Experience Commerce 9 provide you with in order to handle such scenarios? Let's take

Got RAM?

I remember my first experience with .Net Framework and C# after years of MFC/COM/DCOM torture with lovely C++. Whoa, I don't have to track every reference and resource allocation? That GC thing rules! No more memory leaks! Right... Let's say, you're tasked with integrating Sitecore Commerce 9 and some PIM. It totally makes sense to use the Sitecore Commerce catalog system, so your integration would imply importing catalog structure and contents from PIM. While API capabilities of PIMs may vary, pretty much every type of PIM supports file exports of catalog. The native Sitecore Commerce catalog import/export is still in its infancy (no support for partial, incremental, or selective operations, not to mention lack of converters into its pretty unorthodox format, as well as inability to import product assets), so your only option is to build a custom catalog import plugin. The code for creating catalogs, categories and sellable items is relatively well-known and somewhat

You've been toasted!

Contrary to the popular belief, the Sitecore Commerce Experience Accelerator (CXA) is much more than just a set of the commerce-related SXA elements with a reference storefront. Even if your newly created Sitecore Commerce 9 storefront is not going to be SXA-compatible, it makes sense to re-use parts of the CXA features and foundation, as they conveniently encapsulate complexity of the raw Commerce Connect. Since CXA was initially created with the default storefront experience in mind, it still has quite a few quirks that one would not expect to see in a true production-ready framework. One of the most notorious "features" is the default toaster image. Even if you are using a completely custom catalog, while extending the  Sitecore.Commerce.XA.Feature.Catalog feature, product images default to a toaster image. Moreover, if the Commerce Connect chokes while generating catalog templates, and "forgets" to create the Images attribute (the infamous "first produ

Catalog versioning in Sitecore Commerce Engine

Since the release of Sitecore Experience Commerce 9.0 Update-2 entity versioning is enabled by default for all catalog-related commerce entities: Catalogs , Categories and SellableItems . While certainly being a desirable feature, versioning can have a negative effect in certain use cases. Here are a couple of examples: One of the clients decided to use the BizFx business tools as a Product Information Management system. While one can argue on effectiveness of such decision, the real pain came up after the 9.0.2 upgrade when a quick 2-step process of updating the product description suddenly became an unintuitive and clumsy struggle through a dozen of steps. The client absolutely hated that experience and did not really care about versioning. Another client was using an external PIM that we were integrating with by synchronizing the deltas with SXC Catalog system. In 9.0.2 that resulted in creating a new version for every entity update. Not only these versions were useless (sin

Navigation Settings in SharePoint 2013 Site Definitions

Who likes creating SharePoint site definitions from scratch? Well, it's not my favorite part of the SharePoint development either. An initially good idea of setting up your whole site through an XML file, received implementation and support far from being perfect. That quickly lead developers to look for alternative ways of defining and provisioning sites, primarily through the SharePoint API. A simple ONET.XML with beefy code-packed features became de-facto standard. What was supposed to be a template became compiled code. I was hoping SharePoint 2013 would at least attempt to do something about it… Tasked with creating a few publishing portal site definitions, I was unpleasantly surprised to find out that any attempt to use my new site definition to provision a site collection root results in both Global and Current Navigation switched to "Managed Navigation" mode, while I needed it to stay in the good old "Structural Navigation" one. This mode is new to Sh

Distributed Cache and SharePoint 2013

We all know that in version 15 SharePoint is now integrated with AppFabric's distributed cache. There's a Distributed Cache service running on each SharePoint server (with exception of the database ones), AppFabric cache is now configured by SharePoint installation routine, and finally there is a new namespace in SharePoint API: Microsoft.SharePoint.DistributedCaching.Utilities.   You could definitely use AppFabric's cache with SharePoint 2010, as long as you create a wrapper class that takes care of cache configuration, cluster and endpoints instances, etc. However, now that the AppFabric's cache is integrated, you would probably expect something as simple as SPDistributedCache.Get(cacheKey). Well, even a quick look at the poorly-documented Microsoft.SharePoint.DistributedCaching.Utilities  classes tells you this is still far from being true. Essentially the only benefit you currently get from this API is ability to access the distributed cache configuration, and us