Set up EPiServer CMS + Commerce in 11 steps
2015-12-15
Believe or not, it’s super easy to set up an empty CMS site with Commerce package in version 9. Thanks for the EPi team awesome work. In this post, I will walk you through step by step how easy to set up Commerce in EPiServer from scratch.
Prerequisites
- Visual Studio 2013/2015
- Windows 8 above (At least, you will need to have localdb installed.)
- EPiServer CMS VSIX. (You can install within Visual Studio Extension Manager or download from here)
Getting start
CMS
- Use EPiServer VSIX template to set up an empty CMS project.
- Install package “EPiServer.Commerce.UI.ManagerIntegration” via nuget package console.
- UPDATE ALL EPiServer packages.
- Install package “EPiServer.Commerce”
- Run cmdlet “update-epidatabase” via nuget package console.
- Change local database location – Move database to db folders.
In this demo, I placed the db out side of the CMS directory, and put it in the solution root directory.
static EPiServerApplication() { System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"\..\db\"); AppDomain.CurrentDomain.SetData("DataDirectory", dir.FullName); }
- Login to CMS administrative interface with default credntials, then clicks “execute all remaining steps” link to run the migration
username : admin
password : store
Commerce
- Create an empty Mvc application with Visual Studio (Framework > 4.5.2)
- Install the nuget package “Episerver.CommerceManager”.
- Run cmdlet update-epidatabase
- Show all files and include App_Data,App_GlobalResources,Apps, NotificationTemplates folders and Default,Global.asax files.
- Make sure “CommerceManagerLink” in CMS is pointing to commerce manager url.
<add key="CommerceManagerLink" value="http://localhost:{port}/" />
It’s the end, and that’s all you need to do for the setup. Enjoy your EPi development.
Happy Coding! 😇