Recent Posts and Articles
Creating the ShoppingCart service and controller.
In this part, we will enable our users to add products to their shopping cart.
In order for site visitors to be able to add products to their shoppingcart, we need a product catalog.
A product catalog could be as simple as a list of products. However, in this tutorial we want theme authors to be able to take over the rendering of the catalog and for example group the products by some sort of Category taxonomy.
Defining the ProductPart.
Content Items in Orchard consist of Content Parts. Using our Webshop module, we want the site administrator to be able to turn everything into a Product by simply attaching a ProductPart to any ContentType. For example, the user could define a Book content type, and attach the ProductPart to it, effectively turning the book into a product, which can then be added to a shoppingcart and linked to an Order and its OrderDetails.
Creating the Orchard.Webshop Module Project.
A module in Orchard is really just an ASP.NET MVC Area class library that follows both ASP.NET MVC as Orchard specific conventions.
The Orchard conventions power up your ASP.NET MVC Area so that it can integrate with Orchard.
Setting up your Orchard Development Environment (ODE)
When building modules for Orchard, it is recommended to download the complete source.
In this blog post series we will walk through the process of building an Orchard module from scratch!
While Orchard is an awesome CMS with powerful features and inspiring architecture that allows for unlimited extensibility, it might take some time to fully understand it's architecture and being able to customize all aspects of your own Theme or even create entire modules that integrate with all the extensibility points of Orchard.
It is my hope that you will benefit from the knowledge I gained along the way and that you will come to see the beauty of Orchard and its architecture. Not only is it just great for simple or advanced websites and blogs, but it's very much a base platform for building all kinds of webbased applications such as e-commerce backends, CRM's, supportticket systems, project management, community sites, learning management systems and so forth. Basically anything you would do from scratch should be considered being built using Orchard. Orchard is actually more of an extensibility framework than it is "just" a CMS. You plugin your own modules that can do anything which a regular ASP.NET MVC application also can, with the added benefit that Orchard has a rich set of features and composibility concepts of which you can take advantage.
The primary audience of this post are ASP.NET MVC developers who are just getting started with Orchard.
I received an email from an Orchard Web Developer wanting to know how to serve his site.xml file from his Orchard CMS Website. If you add a site.xml file or other static file to the root of your Orchard CMS Website you will get an HTTP 404 Not Found Error. This isn't so much an Orchard CMS question as it is an ASP.NET and Web.config question, because the answer lies in the web.config file for Orchard which is currently configured to respond to all static file requests at the root with a 404 Error if there is no route configured in ASP.NET MVC to handle the request.
A Content Management System (CMS) aims at providing the common pieces while imposing no constraints on the type of site being built. It’s a delicate exercise in extensibility.
The creators of the Orchard CMS (orchardproject.net)—that includes me—have opted for an approach that relies massively on composition and convention. In this article, I’ll present a few examples of simple extensions to the system that should be a good starting point for your own modules.