Views: 13372
Number of votes: 6
Average rating:

Integrating EPiServer CMS, Commerce and Community

Last week at the EPiServer Tech Forum in Stockholm I gave a short presentation about how to integrate EPiServer CMS, EPiServer Commerce and EPiServer Community in the same physical website. This article describes the process of creating a CMS site with both EPiServer Commerce and EPiServer Community also installed.

The crucial EPiServer installations we will be using are:

  • EPiServer CMS 6 R1 (6.0.530.0)
  • EPiServer Community 4 R1 (4.0.517.255)
  • EPiServer Commerce 1 R1 (1.0.0.0)

To check if you have the correct versions installed you can go to the Windows Control Panel and check in the Programs and Features window.

Creating a Social Shopping Site

Open the EPiServer Deployment Center application that ships with all EPiServer Products and do the following:

1. Install a CMS site without content

  • Double-click the Install Site and SQL Server Database node under Installed Products / EPiServer CMS / Version 6.0.530.0 and then enter the information required to create the CMS site.

Note: Do not select any modules when asked, we will be adding Commerce and Commerce Samples later and Public Templates are not required.

2. Add Community support to the new site

  • Double-click the Install Community on existing site node under Installed Products / EPiServer Community / Version 4.0.517.255 and then enter the information required to add Community to the previously created CMS site.

Note: On the ‘Install Database’ wizard page you should select the database and database user installed for the CMS site in the previous step as you want to add the Community database artifacts to the CMS database. If you’re not sure what they’re called then unless you changed them they should have default names based on the site name.

For example, if you named the site ‘MyShop’ then the database should be called ‘dbMyShop’ and the database user (SQL Server Login) dbUserMyShop. You will also need to input the same password given for the login as when creating the site. You will receive warnings about the database and database user already existing to which you should answer ‘Yes’ (I want to re-use).

3. Add Commerce support to the new site

  • Double click the ‘Install EPiServer Commerce’ node under Installed Products / EPiServer CMS / Version 6.0.530.0 and then enter the information required to create the Commerce Manager site and install the additional EPiServer Commerce components. Please follow the instructions in the linked document carefully unless you are a seasoned EPiServer Commerce installer.

4. Add Commerce Sample templates and content to the new site

  • Double click the Install EPiServer Commerce Sample node under Installed Products / EPiServer CMS / Version 6.0.530.0 and then enter the information required to add the Commerce Sample templates and content  to the site.

5. Make some adjustments in web.config

We are now done with the Deployment Center so it can be closed. The Community User Integration Module needs to be added to the site’s web.config. This allows all new users that are created through the Commerce Membership Provider (which is now the default provider) to become enrolled in the Community system.

On IIS 7 or greater:

Under <system.webServer><modules> add the following line:

<add name="CommunityUserIntegrationHttpModule" type="EPiServer.Common.Web.Authorization.IntegrationHttpModule, EPiServer.Common.Web.Authorization" preCondition="managedHandler" />

On IIS 6:

Under <system.web><httpModules> add the following line:

<add name="CommunityUserIntegrationHttpModule" type="EPiServer.Common.Web.Authorization.IntegrationHttpModule, EPiServer.Common.Web.Authorization" />

We also need to remove a controls tag prefix which the Commerce installer added but which the Community systems find highly offensive:

Under <system.web><pages><controls> remove the whole <add> element which has a name attribute of ‘ComponentArt’

6. Apply a small hotfix

The EPiServer Commerce (Mediachase) Membership Provider currently shipped has a small bug which causes the EPiServer Community authorization system to crash. To get around this problem quickly I have made a temporary ‘unsigned, use at your own risk, don’t go live with this’ version of the EPiServer.Common.Web.Authorization assembly which can be downloaded here.

The dll file should be copied to the site’s bin folder. Also, as it has not been signed by the EPiServer trusted certificate, you will need to enable strong name verification skipping for that assembly. More information about how to do this can be found here.

A signed and supported version of the assembly may be obtained on request as a hotfix from EPiServer Support. Of course this problem will be fixed properly for the EPiServer R2 wave (CMS, Commerce, Community, Composer) release due out in Q1 2011.

7. Time to browse to the site

If you haven’t followed the above instructions exactly, and at some point have been logged into the site, you should clear cookies for the site as your original login cookie will no longer be valid.

The only user that is now valid to login with is the one that the Commerce installation created:

  • User: admin
  • Password: store

You can optionally remove the user created by the Community installation (it is not registered in the Commerce provider and will no longer work) by logging onto the site and then locating the user either via the Community –> Moderation Mode –> Search Member facility or by adding the Community Approval Gadget to the OnlineCenter dashboard. Once the user has been located and the link clicked to show the profile, you should see a ‘Deleted’ check box on the ‘My User Details’ tab. Check this box and then click the ‘Save User Details’ button.

8. Complete the Commerce Post Install Configuration

Follow the instructions in the linked document carefully to complete the Commerce post install configuration.

Ready to start developing Social Shopping Features

Your site should now be ready to start adding social shopping features such as product comments, rating and blogs.

Happy shopping!

You now see an example of how to add comments to products here

David.Knipe
(By David.Knipe, 11/3/2010 5:27:55 PM)

I have a client that could be doing just this so this is great!

Please login to comment.