• Collection,  Random thoughts,  ranting,  Tips,  Writing

    The art of asking questions

    This is the second part of a series about most important skills for developer. The first part, about searching for answer skill, can be read here. Searching for the answer is usually the fastest way to solve a problem But searching on Google might not be enough to find you the answers, you might be the first to encounter the problem, or you might be searching for the wrong keyword. Sometimes, you have to ask the questions, hoping that some one, some where does know about the problem, and is kind enough to spend some time reading your questions, and typing the answers. For free.

  • Catalog,  Commerce,  Episerver,  Tips

    Read only Catalog UI – part 1

    https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2015/6/read-only-catalog/ A while back, we had this question on World. It’s not uncommon to update the catalog data by an external system, mostly from a PIM – Product information management system. In such cases, it might not make senses to enable editing in Catalog UI. You might need the new UI for the other parts, such as Marketing UI, but you wouldn’t want the editors to accidentally update the product information – because those would be lost, anyway. Is there away to do it? Yes, there is.

  • Catalog,  Commerce,  Episerver,  Tips

    Beware of IContentLoader.GetChildren() for CatalogContent

    This is more of a self-to-note. If you are using IContentLoader.GetChildren<T>(ContentReference), one important thing to remember is this uses the current¬†preferred language. Normally when you get children of a catalog, or a node, that would not be a problem, because a catalog entity – node or entry, will be available in every language supported by the catalog. So if you just want to get the children references, the language is not important. (Note that, if you just need the children references, IRelationRepository¬†should be a faster, more lightweight way to go, but that’s another story). If you want to get children in a specific language – which is the most common…

  • Catalog,  Commerce,  Episerver,  Performance,  Tips

    Episerver Commerce catalog performance optimization – part 4

    Recently I worked on a support case where a customer reported deadlocks and timeout exceptions on queries to a specific table – NodeEntryRelation. Yes, it was mentioned in this post. However, there is more to it. Keeping the indexes healthy definitely help to improve performance and avoid deadlocks and timeout exceptions. However it can only work to a limit, because even if the indexes are in their perfect state (the fragmentation level is 0%), the query will still take time. Looking in the query we talked about – ecf_Catalog_GetChildrenEntries – what does it do. It lists the entries which are direct children of a catalog. So normally entries belong to…

  • Catalog,  Commerce,  Episerver,  Tips

    Reindex obsolete prices in Episerver Commerce

    Recently I stumped upon this question: http://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/8/event-for-price-becoming-validinvalid/ which is very interesting to me. I can see this is a real scenario – and even quite common. When a price become obsolete, you want your contents to be reindexed so the next time you query, the search result will be returned correctly. But how?

  • SQL Server,  Tips,  Uncategorized

    Import a bacpac to SQL Server

    This is more of a note-to-self. I sometimes have to import a bacpac file from customer’s database (usually from Azure SQL database) to my local machine – . For most of the time it’ll be very easy when the databases are in .bak format, but for .bacpac file it can be pretty complicated. Sqlpackage.exe is the standard tool to import the .bacpac file, and it can be found with the installation of Visual Studio (for example C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130) or SQL Server ( C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin ). Latest version should be used because they can support the older formats (.bacpac exported from older SQL Server version),…

  • Commerce,  Episerver,  Order,  Tips

    Merging carts when a customer logs in

    It’s quite common when a customer browses your site without logging in – either she/he intentionally does that, or just forget about logging in. The customer might add some items to carts and even checks out, but then is asked to log in or remember to log in. What would happen? By default, Episerver Commerce will do as following: Attach all orders made by that section to logged in customer. (I once placed an order in a famous retailer in Sweden without logging in, and then I asked their customer service to link that order to my account so I can track it easier. To my surprise, it cannot be…

  • Catalog,  Commerce,  Episerver,  Performance,  Tips,  Uncategorized

    Can Episerver Commerce support our catalog size?

    One of the questions customers usually raise during evaluation of Episerver Commerce is : “Can it support our catalog size? We have (a very big number of ) entries. Will it work?” The answer is (of course, as always): It depends! I’ve seen “big” catalogs. Some big enough in number – 1 million entries catalogs are not very uncommon, and some are even (much) bigger. Theoretically, Episerver Commerce can support up to 512 millions¬†1 billion of entries (!), so you can have pretty much anything in your catalog until you reach a hard technical limit. Just for comparison, Amazon.com, which is arguably the biggest eCommerce site on the world, has…

  • Catalog,  Commerce,  Episerver,  Performance,  Tips,  Uncategorized

    The Catalog UI trade-off: performance or better UI

    I supposed this is a well known feature, but I was asked more than once about it, so it’s better to write something here to clarify the confusions. If you have some very, very big catalogs, you probably have seen this “notification” in Catalog UI By default, the Catalog UI groups a product and its variations in a parent-children view (they are not exactly parent-children, by the way). However, to do that, it needs to know about all the entries in that specific category. If it’s a small category, it should be no problem, but if it’s big one, then it’s inevitable slow. The lazy loading which the catalog content…