• Business Foundation,  Commerce,  Episerver,  Uncategorized

    Episerver Commerce CustomerContact Events

    This post was inspired by this question: http://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2016/9/commerce-manager-contacts-events/ and is an excerpt from my book: https://leanpub.com/proepiservercommerce You might notice the lacking of events in some parts of the system. We have events for catalog system, for order system, for prices and inventories changes, but that’s not enough. You might want to have events – or at least – the ability to know when something happens. For example, when a customer contact is changed, or edited, or deleted, it would be very nice to do some extra actions. Sending emails, updating external systems, etc. Such events are not available out-of-box, so we have to implement our own. How? We don’t have ICustomerContactService (or something similiar) interface where…

  • Catalog,  Commerce,  Episerver,  SQL Server,  Tips

    The hidden danger of dot (Or why should your metafield not contain . in the name)

    A dot (.) – it is harmless. What harm can it do, it looks pretty innocent. And yet it can break your Catalog UI. Catalog UI relies on the Shell UI from CMS to render properties and such. Shell UI, in its hands, needs to know about the metadata of the properties. When you have dot in the metafield names, the MetaDataPropertyMapper will create an Property with that name on site start up. And then when you open All properties mode, Shell UI will request your content type models, and CMS Core will happily return those properties.

  • Commerce,  Episerver,  Promotion

    How to check if a coupon was successfully applied

    When a customer add a coupon to his/her cart, it’s nice and best practice to show to him/her if the coupon has been applied successfully, or if it was an invalid/not applicable code. How can you do that? In old promotion system When old promotion system run, each successfully applied promotion will be presented by an instance of Discount, which has a property named DiscountCode – this is the coupon used for the promotion (it can of course be null if the promotion requires no coupon).

  • Life,  ranting,  Tv

    Why did I leave HBO (Nordics). Spoiler: it sucks!

    As most of us, I spend a fair chunk amount of my free time to watch movies and TV series, and as most of us, on Netflix. While Netflix has some very good content, and they have been adding great original TV series (House of Cards, Daredevil, Stranger Things, Narcos, just to name a few), those have not been enough for me. I want to watch Games of Throne, The Wire, The Sopranos, Silicon Valley etc, but sadly, they are pretty HBO-exclusive, so to watch them, I have two options: either buy the discs (Very expensive), or subscribe to HBO (much cheaper). Fine, I decided to suspend my Netflix for a…

  • Configuration,  Tips,  VisualStudio

    Fixing Visual Studio 2015 after update 3

    In case you did not notice, Microsoft released Visual Studio 2015 Update 3 a couple of days ago. I immediately jumped in because I have high hope for better stability – VS2015 update 2 has been crashing more open than I would like. When I updated my VS on my work computer, all went well and it worked right after that without any problem. However when I finally updated my VS on my home computer, problem appears. Everytime I try to open a solution, it crashes! Rendering my VS2015 totally useless. It’s not a problem I can ignore, and I would avoid reinstall it, unless it’s the last resort. Digging in…

  • gaming

    The best trailers of E3 2016

    E3 is undoubtedly the biggest gaming event of the year – where companies show off their best games and hardware for the next year. And as other gamers, I pay my close attention to this event, waiting to see what will be my next game. It’s worth noting that I am highly selective – I only play 3-4 games a year, max, so I need to decide carefully what to play and what to skip. But it won’t hurt to watch the trailers, right Titanfall 2, EA Titanfall was a great game. It might not be a legendary game, but it was fun. It’s unsurprising EA and Respawn game were going…

  • gaming,  Tips

    Things I wish I knew before playing The Witcher 3: Wild Hunt

    The game was released 1 year ago – still – it’s a masterpiece to be played. If you’ve never played it, play it now – it’s easily one of the best games in years, if not decades. The storyline with twists will keep you thinking in a while (no decision is clearly better or worse, and your choices will definitely make impacts on the ending), while the graphic is still one of best in any games, and the gameplay will keep you excited. If you played it – it’s now time to replay it, with new expansions, Heart of Stones and Blood and Wine. They are some of best expansions…

  • Git,  Leanpub,  Learning,  Tips,  Writing

    Git in easy steps – branch

    This is the third part in a series Git in easy steps – the basic Git in easy steps – amend and stash Git in easy steps – branch Then what is a branch in Git, actually? A branch in Git is simply pointer to the hash of a commit (which will be the HEAD commit of that branch), and a name of your branch, of course. That means creating a branch in Git is extremely cheap and is almost instantous. If you worked with some other VSC systems before, such as Team Foundation Server, branching will involve copy entire of the repository – including all and every folders and files. That…

  • Git,  Leanpub,  Learning,  Writing

    Git in easy steps – amend and stash

    This is the second part in a series Git in easy steps – the basic Git in easy steps – amend and stash Git in easy steps – branch Fixing your commit: Sometimes, you make a mistake committing something. A file can be missing, or the indentation is not perfect, or you had a typo in your commit message. If you are using some other source control softwares such as Team Foundation Server you’re done with that. The only option you have is to check in another change set to fix your previous one (in case you have a typo in your commit message, be done with that). Git is so much…

  • Git,  Leanpub,  Learning,  Writing

    Git in easy steps – the basics

    This is the first part in a series Git in easy steps – the basic Git in easy steps – amend and stash Git in easy steps – branch Why Git Extensions. The war of version control systems was over. Git has won. And that is not an over-statement. CSV, SVN, TFS were the past. Mercurial was close, but GitHub put the end of it. The popular of open source platform makes Git an unambiguous choice for almost every developer in the field . Even BitBucket, the service which once known for Mercurial, supports Git for now. If you start a new project today, Git should be your first and foremost…