Loading...
Area: Episerver B2B Commerce

B2B Commerce environment setup for developers

Recommended reading 

The following describes how to set up your developer workstation to start building Epi B2B Commerce Cloud solutions.

Prerequisites

To successfully setup your Epi B2B Commerce (ISC) in the Cloud developer environment, the following must be completed:

  • Possess knowledge and understanding of the Git technology and command line tools
  • Pass the Certified Epi B2B Commerce Cloud Developer certification
  • Create a private GitHub repository and have access to edit collaborators
  • Complete the Project Initiation Form and received a response from Episerver Application Support.
  • Episerver has completed the provisioning of the Sandbox and Production Epi B2B Commerce Cloud instances.

Use the list below to step you through the developer workstation setup.

Authorize Episerver account to GitHub
  1. On github.com navigate to the repo.
  2. Go to Settings > Collaborators & Teams.
  3. Under Collaborators enter "insite-teamcity-build" and click Add collaborator.
  4. Change permission for insite-teamcity-build to Read. 

NOTE: This is only allowed for organizations, not personal accounts. For personal accounts, github only allows full access collaborators.

Clone insite-commerce-cloud repository
  1. Open git bash or command line
  2. git clone https://github.com/InsiteSoftware/insite-commerce-cloud.git
Replace default remote origin
  1. Change directory to the cloned directory
  2. git remote rm origin
  3. git remote add origin [YourRemoteGitPath]
  4. For example, https://github.com/yourprofile/isccloud.git

Add upstream repository

Add the original upstream repository to receive any new updates deployed by Episerver to the Epi B2B Commerce.Web project in the repository. This will use git tags to identify releases. Git pull specific releases to test specific versions locally against customizations (theme and extensions).

  1. git remote add upstream https://github.com/InsiteSoftware/insite-commerce-cloud.git
  2. git push --set-upstream origin master

Create a custom Classic Theme or Spire Blueprint

Classic CMS - Create a project theme using the Powershell script provided. Multiple themes can be created in a single repository, however, themes cannot have the same name. 

  1. In Windows Explorer, locate the local git repository and navigate to the /src folder
  2. Open Powershell and execute the ./createTheme.ps1 Powershell script
    For example, ./createTheme.ps1 -themeName "YourCustomTheme"
  3. Open the Epi B2B Commerce.Web solution in Visual Studio and validate it contains an Extension library, Epi B2B Commerce.Web project, and the custom Theme project.

Check Environment Versions

Use the steps under Update Local Sandbox to Latest Version in the Epi B2B Commerce Cloud Deployment Process article to make sure the version used to generate the theme is in sync with the deployed version. This is so you don't merge a code version that's ahead of what you've already deployed or are deploying with the new code you're merging.

Configure Episerver NuGet source in Visual Studio

The email supplied to Episerver will be invited to a MyGet feed. In order to receive the feed, a free or paid MyGet account will need to be created. A free MyGet account can be used, as it will only be receiving the read-only feed from Epi B2B Commerce. A paid account is only required if you also host your own feed.

If you are new to B2B in the Cloud and you are not working on an active project, please submit a support ticket requesting an invitation to the MyGet feed and InsiteSoftware Git repository. When creating MyGet and Git accounts please create a shared group account, as individual accounts are not allowed. For example, partnername-Episerver not JonDoe-partner.

Submit Ticket

  1. Log into MyGet
  2. Browse to https://www.myget.org/feed/Packages/Epi B2B Commerce
  3. Click on Feed Details on the left
  4. Copy the pre-authenticated URL to your clipboard
  5. In Visual Studio, navigate to Tools > Options > NuGet Package Manager > Package Sources
  6. Click Add
    1. Name - Epi B2B Commerce
    2. Source - [pre-authenticated url]
  7. Restore packages

Configure the local environment

Configure IIS, SQL, and the HOSTS file to debug the solution locally.

NOTE: The following steps can be completed manually and without using the Epi B2B Commerce installer.

  1. Locate the root directory of the local git repository and execute the Epi B2B CommerceSetup.exe file
  2. Complete the setup using the guided instruction
  3. Open the HOSTS file with Administrator permissions and add the corresponding local entry
  4. Open Visual Studio and rebuild the solution

Finalize git branching

Create two local branches called sandbox and production. The remote branch is automatically created when you push it to the remote server. These will be used in their corresponding deployments. Production deployments will be scheduled by Episerver. Theme and server-side customizations will not automatically go live upon push into the remote production branch. Sandbox deployments will be automated and any customizations will refresh the insitesandbox.com domain within a few minutes of a git push to the remote sandbox branch.

  1. Open git bash or command line and open the install location.
  2. git branch sandbox
  3. git branch production
  4. Verify the Epi B2B Commerce website loads in the browser on the local dev machine.

 

Next Article

Related Articles

Do you find this information helpful? Please log in to provide feedback.

Last updated: Dec 11, 2020

Recommended reading