Posted on Sep 19, 2012

Mastering customised emails with Sitecore ECM

We’ve recently been asked to create some highly customised and personalised email campaigns in Sitecore’s ECM (Email Campaign Manager). This module is part of DMS and allows you to tap into your website content and customise emails using the Sitecore API we’re all familiar with.
Read Full Post

Posted on Dec 1, 2011

Battles with MySQL, big data and UTF-8

I was recently asked to restore a 5GB MySQL database to a new environment during a site migration. Easy enough I thought… we’ve got a dump file and an empty database. OK, it’s going to take a while but it should be fine.

Sheer stupidity. With that much data coming from another source there were bound to be problems. Read Full Post

Posted on Nov 11, 2011

A PHP proxy script for logging Magento API SOAP calls

We’ve struck the need to debug client’s calls to the Magento API during product import and update processes on a couple of sites.  Magento’s API isn’t the fastest, but various factors could be contributing to performance issues and errors being returned.  In a couple of cases recently, we’ve needed to check:

  • Our client’s import / sync routines are definitely calling the API correctly, and synchronously
  • Is there a performance problem?  Client-side or application-side?
  • What does the raw request look like, are similar calls similarly slow?

If we can establish some of the above we are better equipped to pinpoint the problem and fix, so on the suggestion of a good mate I decided to write a proxy script to run all requests through, log things and see what was going on. Read Full Post

Posted on Nov 10, 2011

Ultimate 301 & 404 handler for Sitecore – Part 2

In Part 1 I went through the process of getting Sitecore pipelines to handle an XML file containing redirects. If no URL match could be made in the redirects file, and no actual Sitecore item was found, a 404 status is returned with a friendly 404 page.

In this part, I’m going to show how we manage these redirects within Sitecore, and publish them out to the XML file for handling at runtime.
Read Full Post

Posted on Oct 29, 2011

Ultimate 301 & 404 Handler for Sitecore – Part 1

While I hesitate to call this “ultimate”, I can’t help but feel like this is an achievement after a number of routes were followed and ultimately fell short in one way or another.  The culmination of those lessons learned is here, in two parts, with some code snippets to download.

First thing to note is this was built for Sitecore 6.2.  I’m not sure if there are any goodies in later versions which make any of this easier.  We’ll be getting our hands dirty with 6.4 shortly.

Our requirements:

  • Handle 301 redirects, from old site URLs to new for site migration. Must include static (i.e.htm) files as well as folders and aspx pages
  • Handle 301 redirects for aliases (i.e. vanity URLs)
  • Manage these 301′s via Sitecore
  • Handle 404 pages properly, i.e. by returning a 404 status and our custom page without redirecting

On the surface this might seem like it should be straight-forward, until you run into some of the issues thrown up by IIS7′s 404 handling, Sitecore’s built-in 404 redirect and alias handling, and the IIS URL rewrite module, all of which were investigated before being abandoned.
Read Full Post

Posted on Oct 28, 2011

The start of something?

Having spent the last ten years (more, actually) building a career in web development, in a large part thanks to the abundance of free information available on the Internet, I figure it’s time to give something back.

I’m self-taught you see.

Like most developers, the “Google when your stuck” philosophy has helped me no end.  Remember when we used to buy 4 inch thick books on SQL Server?  Well they’re now where they should be – propping up my monitors. I owe a debt of thanks to Experts Exchange, StackOverflow and myriad other forums and blogs which have helped me develop as, well, a developer.

Another motivation for creating this blog is a need to focus the technical track of my mind somewhere.  Previous tweeting and blogging was a mish-mash of music, photography, food, programming, politics etc etc.  All better left on Facebook where people who care (hopefully) hang out.  I doubt too many devs out there give a monkeys about the cod with Spanish tomato sauce recipe I just found.

However, I digress.

Here I intend to write-up some of the more helpful bits of code, approaches to problems, server configurations and generally interesting stuff I come across during my days at work.  Expect bits of C# .NET, PHP, JQuery, Sitecore WCM, Magento, Windows Server and Linux.

Hope someone finds it useful, and if you do (or don’t, or disagree, or whatever), hit me up with a comment of find me on twitter.  Always up for a debate, or some would say, an argument…

Latest Tweets