Store Specific Messages on Magento CMS Pages

If you have a multi website or multi-store Magento store, you will come across the issue of presenting store specific messages to your users. How, for example, do you tailor store specific messages on the 404 Page Not Found page, for example?

Well, first things first. Why would  you want to present a different message on each store for something so basic as the 404 page?  There are several reasons but the most obvious is this – if someone has landed on your 404 page (say through a bad link in the Google index), then its an opportunity to turn them into converting visitors. They’ve landed on your site – you’ve done the hard work in getting them to visit your store – you might as well make the extra effort to turn them into customers.

So, rather than confronting these would-be customers a generic “opps, our bad” message, you could redirect them to a specific category or present them with your best selling products. It makes sense.

However, if you’re running a multi-store Magento installation, how do you ensure that you send them to the right category for that particular store? There are three ways to achieve this. I’ll list them in order of difficulty.

1) First create static blocks with the content that you want for each particular store. Then you put some code in the target CMS page (the 404 in this instance) that looks at the store, and then loads a static block for that particular store. This means you’ll be coding templates – not something most store administrators are comfortable doing, nor is it very maintainable.

2) Another alternative is to create separate 404 pages for each store or website. Then in the Configuration you just need to assign the correct 404 page for that particular store. This is relatively simple but you may end up with many 404 pages.

3) The easiest method, I believe, is to create a separate static block for each store/website view. You then add these static blocks to the content of the standard 404 page. Magento will then only show the appropriate static block for that store/website – the static blocks assigned to other stores/websites will be ignored.

Here are examples of this approach in action:

  • Custom Error Page - example 1
  • Custom Error Page - example 2

Both these websites are using the same default 404 page, with the default content replaced by static blocks. The actual content you see comes from the store specific static block. This is probably the easiest way of getting store specific messages on Magento CMS pages.