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 . 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-5b08a28a58d94938304670/] 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

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

Package equivalent promotion type in Episerver Commerce

Recently we got this question on how to create package-equivalent promotion type in Episerver Commerce, from I already recommended to use package for such purpose, because of several reasons:

  • Package is a builtin feature, and is fully supported by the framework, both on UI level and API level.
  • It has been well tested and is very reliable to use.
However in a real world implementation, it might not be easy to just add package implementation. One reason would be if you rely on an external PIM to handle your catalog. Configuring it to support package can not be trivial. So why not try to implement a package equivalent promotion in the promotion engine, to see if it works. (more…)

By vimvq1987, ago

Useful T-SQL snippets for development and troubleshooting

This post is more of a note-to-self. These are the useful T-SQL statements which can be incredibly useful in development and troubleshooting [crayon-5b08a28a5aadd387729032/] Turn on the IO statistics for statements run after that until set to OFF explicitly. We then switch to Messages tab to see how many IO operations were done on each table. [crayon-5b08a28a5aae5964714554/] Find out about the statements were executed: which statements, its texts, how many reads (logical), how many time was spent on CPU and how many time was spent total (more…)

By vimvq1987, ago

Speed up your Catalog incremental indexing

As your products are being constantly updated, you would naturally want them to be properly (and timely) indexed - as that's crucial to have the search results that would influence your customers into buying stuffs. For example, if you just drop the prices of your products , you would want those products to appear in new price segment as soon as possible. This should be very easy with Find.Commerce - so if you are using Find (which you should) - stop reading, nothing for you here. Things, however, can be more complicated if you are using the more "traditional" SearchProvider. (more…)

By vimvq1987, ago

Fixing Cannot find module ‘sync-exec’ error with yarn install

Error message:
clientResources\node_modules\uglifyjs-webpack-plugin: Command failed. Cannot find module 'sync-exec'
uglifyjs-webpack-plugin 0.4.6 defines this command 
"postinstall": "node lib/post_install.js"
which looks like this
[crayon-5b08a28a5b153233464205/] So if your node instance is older than 0.10, it will fallback to require sync-exec . Unlike execSync which is a builtin module, sync-exec is, or was an old module that you have to install explicitly. If your node instance does not have that installed, boom! (more…)

By vimvq1987, ago

Why you should upgrade to the latest version

I made no secret that I'm a die-hard advocate for upgrading to latest EPiServer CMS/Commerce version. There are several reasons for that, mostly from new shiny features that your businesses dearly need, new big performance improvements that your customers firmly demand. But there is another, not so obvious reason: support. Let me tell you a story. This morning we received a support case from support team. A customer recently upgraded from Commerce 7.5 (Eww) to 11.7 (Yay!), things went well except they had a small problem with data displaying in Catalog UI. Some of the properties were not properly displayed, but they are still showing correct in Commerce Manager. (more…)

By vimvq1987, ago

World forums support vote up/down now, and what does that mean for you

I really wanted to post this in the official blog, however we don't have a "World" blog, and this does not really fit into "Commerce blog" which we (Commerce development team) usually use for official announcements, so I have to use my personal blog instead. If you haven't noticed, then you can now vote up, or down a post in World forum. Thanks to the hard work of my colleagues in World development team, that feature went on live today! (Of which I'm very excited) If you have been using StackOverflow (as as developer, you likely have), then you know the meaning of voting up and down. The idea is the same here, there are differences in the detail implementations, such as the amount of points given (or taken) from a vote up (down), but basically: (more…)

By vimvq1987, ago

ServiceAPI + Postman, a match in heaven

No, it's just a note-to-self. A lot of customers have been using ServiceAPI, and to great successes. We also have very good documentation here - of which largely thanks to my colleague Mark Hall. But what if you want to play around with ServiceAPI and don't want to write app/build/run it yourself? The answer is simple: There are many REST Clients can do the job for you, and Postman is usually regarded as the best/most popular one. But, the documentation are for C# client, it can be quite confusing to use Postman to work with ServiceAPI for the first time (or times). If you are experienced with Postman, great! But if you are not - like me - when you use Postman from time to time and everytime it's new, then this post can be useful to you. Today I need to do some tests with ServiceAPI, and I had to spend some time figuring out how to use Postman - so I decided it's better to have all of those noted for future reference. (more…)

By vimvq1987, ago