• Catalog,  Commerce,  Episerver,  Tips

    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-5c116dbbe8601008571061/]

  • CMS,  Episerver,  IIS

    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…

  • 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…

  • IIS,  Tips

    Fixing HTTP Error 500.19 – Internal Server Error

    When you are trying to setup an IIS website on your local machine/new server, it’s very likely that you are going to get this error HTTP Error 500.19 – Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information: Module    IIS Web Core Notification    Unknown Handler    Not yet determined Error Code    0x8007000d Config Error Config File    \\?\C:\EL\EL\CMS\web.config Requested URL    http://el:80/ Physical Path Logon Method    Not yet determined Logon User    Not yet determined Config Source: [crayon-5c116dbbe9f85807206151/] More Information: This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some…

  • Commerce,  Episerver,  Order,  Promotion

    Package equivalent promotion type in Episerver Commerce

    Recently we got this question on how to create package-equivalent promotion type in Episerver Commerce, from https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2018/2/is-there-a-built-in-group-discount/ 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…

  • Debugging,  Performance,  SQL Server,  Uncategorized

    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-5c116dbbeafbd269178335/] 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-5c116dbbeafc8301178801/] 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

  • Catalog,  Commerce,  Episerver,  Performance,  Tips

    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.

  • TeamCity,  Tips

    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’ Reason: uglifyjs-webpack-plugin 0.4.6 defines this command  “postinstall”: “node lib/post_install.js” which looks like this [crayon-5c116dbbeb6c0632779506/] 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!

  • Commerce,  Episerver,  Random thoughts,  ranting,  Tips

    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.

  • Episerver

    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…