Commerce

Index or no index, that’s the question

If you do (and you should) care about your Episerver Commerce site performance, you probably know that database access is usually the bottleneck. Allowing SQL Server works smoothly and effectively is a very important key to the great performance. We are of course, very well aware of this fact, and we have spent a considerable amount of time making sure Commerce database works as fast as we could. Better table schema, better stored procedures, better indexes, ... we have done all of that and will continue doing so when we have the chances. (And if you find anything that can be improved, you are very welcome to share your finding with us) But there are places where the database performance improvement is in your hand. (more…)

By vimvq1987, ago
Catalog

Multiple sites: Building the outgoing URLs

In previous recipe we talked about multiple catalogs with same "UriSegment" - which we had a working implementation for incoming URL, i.e. when a customer visit a product url, we know which catalog we should choose from. But we still need to cover the generation of outgoing URL. I.e. when we link a product (For example, from a campaign page), we need to generate an URL which take the "catalog-less" pattern into account. We need to understand how the outgoing URL is built. The hierarchical router builds the URL by the RouteSegment of contents. However, we want to the urls appear to have same catalog, so the RouteSegment part for the catalogs must be the same, regardless of the true catalogs. Because all catalogs are on same level, their RouteSegment must be unique - and this is enforced from Framework level (which is understandable, otherwise, how can it know which content to choose). (more…)

By vimvq1987, ago
Catalog

Multiple catalogs with same url

This is an excerpt from my second book . The first chapter is available to read for free. A business is having an Episerver Commerce instance with multiple sites and multiple catalogs set up. They want to make sure each site will use one catalog, and all of them will share the same url for catalog structure. So it'll be "https://site-a.com/products/category/", and "https://site-b.com/products/category/". Site A and site B are using different catalogs. Is this doable? Yes! It's just a matter of magic with the routing. This time, we would need to do an implementation of HierarchicalCatalogPartialRouter ourselves. First, let's create a template for it: [crayon-5ad4b5ccd8b40923811252/] (more…)

By vimvq1987, ago
CMS

Adding backslash ending to your URLs by UrlRewrite

It's generally a best practice to add a backslash to your URLs, for performance reasons (let's get back to that later in another post). There are several ways to do it, but the best/simplest way, IMO, is using UrlRewrite module. In most of the case, processing the Urls before it reaching the server code will be most effective, and here by using UrlRewrite we trust IIS to do the right thing. Our application does not even need to know about it. It's also a matter of reusable. You can simply copy a working, well tested rule to another sites without having to worry much about compatibility. Before getting started, it's worth noting that UrlRewrite is an IIS module which is not installed by default, if you want to use it, then you would have to install it explicitly. Download and install it from https://www.iis.net/downloads/microsoft/url-rewrite . And then we can simple add rules to <system.webServer><rewrite><rules> section in web.config. For the purpose of this post, this rule should be enough: [crayon-5ad4b5ccd901d279071592/] If you are new to UrlRewrite, may be it's useful to explain a bit on the rule. Here we want to add a rule which matches every url, except the urls which already end with backslash (/) already. (more…)

By vimvq1987, ago
gaming

Is PlayStation 4 Pro a worthy upgrade?

PlayStation 4 Pro was a first "mid-gen" upgrade in a very long time. It is an incremental update to the original PS4, keeping the promise of backward compatibility, at the cost of limited power jump. Is it a worthy upgrade? I got my original PS4 3 years go and that was a massive jump from my previous Xbox 360 (of course that is expected, it's a different generation). Builtin hard drive, builtin WiFi N, builtin gigabit LAN, builtin Blu-ray drive, the list goes on and on. Needless to say, I have been very happy with my PS4. When Pro came out, I was a little disappointed. No UHD Blu-ray. Unable to handle native 4K on most games. Old games were not getting a patch. HDR comes to original PS4 as well. Etc. I was not excited to buy one, unless my PS4 fails. Well, my PS4 did not fail, but my colleague sold his fairly new PS4 Pro at 1/2 new price, and I decided to take the chance. At that price it's great value, and even if I don't like it, I can still sell it and even make a profit! Of course there was no "Wow" moments as I had with my old PS4. (more…)

By vimvq1987, ago