This project is read-only.

Merging Orchard with a custom commerce engine

Topics: Customizing Orchard
Jun 20, 2011 at 11:32 PM

I have a large custom ecommerce engine that is currently using a SQL Server database (stored procedures handling most data tasks), a WCF middle-tier (handling business logic), and an MVC front-end site (that has no knowledge of any database).  Our need for a content management system is increasing rapidly and I'm trying to figure out the best way to implement one, considering our very taxed development resources.

My first thought it to simply have two websites, an Orchard CMS site and our e-commerce site.  I could setup some type of request routing that would send URLs for catalog browsing and cart functions to the ecommerce site, while other URLs get handled by the Orchard site.  I would have to have a couple of modules (or widgets) built within the Orchard site that would display things like the cart summary that appears in the heading of each page.  This seems like the easiest method of handling this, even if it is short-term.

My other thought is to have the site completely built using Orchard.  This would require porting our ecommerce logic into modules.  This seems like it would be one hell of a task.  All of our work is done via web services, so if a user goes to a specific category URL, the site would call a web service and pass some variables (customer ID, category, etc).  The web service would return the categories, products and prices for that customer - which would then be displayed on the screen.

Lastly, an even more complex version of the last option would be to actually store the products in Orchard, so that editable fields (description, meta tags, etc) would be managed through the Orchard CMS.  This would require major changes to (or absorption of) our WCF middle-tier.  This seems like it would be almost impossible, but may allow better handling of more media down the road (photos, videos, MSDS sheets, product literature, etc).

What are your thoughts so far, between these three models.

Jun 21, 2011 at 6:34 AM

What you are describing in your 1st thought is what this module does He's got 2 web sites, one for the backend, and a module for the front end integration. And it gets it's data through a service layer, as far as I can see.

If your current implementation is with webforms, porting everything to mvc and orchard will take some time, but if you feel that Orchard is here to stay, than by all means go this second route. At least Orchard will have an ecommerce integration.

Jun 21, 2011 at 6:38 AM

Just to clarify, our ecommerce engine is completely written in MVC & WCF.  We've already begun rewriting the MVC(1) code to MVC3, due to our current implementation of SAP.  So, everything being available in MVC should make things a bit easier.

Jun 21, 2011 at 6:47 AM

Then see how you can get the mvc website to act as a MVC Area, that's what Orchard modules are in fact.

So I think you just need to move the codebase to mvc3, and even if you don't refactor your views in Razor ( for the time being) you should be able to create a module ( aka mvc area ). Write your implementation of IRouteProvider. And wire everything up.

You might find that running in medium trust doesn't allow calls to WCF service, but that should be easily mitigated by using full trust.