NOPCommerce Themes and Theming

NopCommerce 2.0 is now fully ASP.Net MVC3 using razor etc. Pretty nice stuff. This makes porting a site from earlier version a bit of a challenge, if it has a lot of customization. Actually if you only made customizations via CSS modifications, then it is actualy very easy to port over (I’ll make another post covering this), but changes to any of the aspx files will require porting these over to the new razor .cshtml format.

When doing this porting though, a nice new feature in 2.0 makes this job easier-  the ability to “overload” a view inside your theme. This basically means that a custom pluggable theme can change the page structures. Previously, the themes really only had power to change things via stylesheets, so you could change colors and formatting, but doing deeper modifications to pages requred opening the source code in visual studio and hacking on the .aspx pages.

To take advantage of this feature, just add your overloaded (or even completely new) .cshtml files inside the /themes/{your theme}/Views folder. This folder should mimic your normal views folder, ie it should use a /Shared folder for shared views, /Home for the home etc.

Now you can hack on the structure of your site without having to change the original .cshtml file.. if you mess things up, just delete (or rename) your theme view and the original view will be picked up and used.

 

NopCommerce 2.00 is released- time to upgrade

The long-awaited 2.0 release of NopCommerce was released today. It’s going to be a lot of work, but we will be porting our primary nop project, Deadlywind.com, to the new framework as soon as we can. We’ve been holding off on a lot of improvements to the site/store knowing that this major update was coming out soon (and even held off on doing some new ecomm projects for this same reason).

The new version has been fully migrated to MVC 3, so we’ll get all the benefit of Razor, clean URL’s, and easier theming and modifications through the new plugin framework. Really looking forward to the new features, but not super excited about porting it all over. I’ll likely update this post, or add another one with all our findings/gotchas/howtos for this.