Views: | 14473 |
Number of votes: | 6 |
Average rating: |
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:
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.
Open the EPiServer Deployment Center application that ships with all EPiServer Products and do the following:
Note: Do not select any modules when asked, we will be adding Commerce and Commerce Samples later and Public Templates are not required.
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).
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’
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.
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:
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.
Follow the instructions in the linked document carefully to complete the Commerce post install configuration.
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
I have a client that could be doing just this so this is great!