nopCommerce Tips: Adding a Custom 404 Page

It’s highly recommended for a website to have a customized 404 page. Customized 404 pages provide an opportunity to re-direct site visitors to areas of interest and focus, and maintain branding visibility. At this time, nopCommerce (2.65) doesn’t have a built-in 404 customization solution. However, there is a way to implement one, using the MVC framework nopCommerce is based on.

I’d like to express my appreciation to nopCommerce forum user “Threadrock“, who posted the link to Dave Bouwman’s how-to article “Custom 404 Pages for ASP.NET MVC 3“.  In this article, Dave Bouwman covers the steps to create your custom 404 route for an MVC solution. Since nopCommerce is based on Asp.Net MVC, you’ll find the detailed explanation to be very helpful. In the following summary, it’ll be assumed that you’re working from Visual Studio 2010, working on the source version (which can be downloaded from here).

To cover the highlight steps:

1. Open your nopCommerce solution in Visual Studio 2010

2. Locate and open the global.asax file, under Nop.Web.

3. Find the Application_Error method that’s already been started

4. Above the call to “LogException”, add additional error handling along the lines of that which is referenced in Dave’s article. Remember that you’ll also need to add an error controller in the Controllers folder under Nop.Web

5. Add your error controller, as well as your custom view under the Views folder.

For some tips on creating a great custom 404 page, check out this article, “Improving 404 Page Design”.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Looking for quality nopCommerce Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , | Posted under nopCommerce | RSS 2.0

Author Spotlight

Carole Bennett

Carole Bennett is the founder and principal of IndigoTea. As a professional IT consultant, Carole has provided solutions for companies as diverse as Verizon, Frito-Lay, Capital One Auto Finance, and Zales Jewelers, parlaying a unique talent for acting as a translator between the worlds of business challenges and technology solutions. She considers multi-tasking skills gained from simultaneously 1) managing a fire performance troupe, 2) raising a family, and 3) working as a full-time IT consultant excellent preparation for her current career incarnation as the driving force behind IndigoTea. "Fire-breathing redhead on a mission" is not just a metaphorical description!

Leave a Reply

Your email address will not be published. Required fields are marked *


5 + 4 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>