Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Upgrade Configured Commerce

Describes how to upgrade Optimizely Configured Commerce.

Update local sandbox

You should always work with the latest sandbox version, and the production branch should always mirror what is currently deployed to the live site. It is possible to use selective merging when you need to test a specific Optimizely Commerce version.

Git fetch will retrieve all of the commits in the upstream repository. This will not change local repository files, but it does make them available to the developer. Git pull is a combination of a fetch and merge to current version.

For example, retrieve the latest versions and update the local repository:

  1. git checkout Sandbox
  2. git fetch upstream --tags
  3. git merge 4.3.2.12345

Add or update files

  1. Open git bash or command line
  2. git checkout sandbox
  3. Make any changes to the projects

When you make changes within your Extensions project, there is one extra step you must take after building your project and solution: the Extensions.dll file that is produced from the build must be placed inside the /dist directory found in your local copy of B2B Commerce. This is the directory that will be searched in order to find server-side extensions. The Extensions.dll file will be deployed to your sandbox environment by an internal Optimizely process. A PowerShell script is included in the /dist directory that will build your Extensions project in Release mode and copy the Extensions.dll to the appropriate place for deployment. You can have Visual Studio execute the PowerShell script automatically with a build script. Copy the following script and use it as a post-build script for the Extensions project.

powershell.exe -command "& { $(SolutionDir)..\dist\buildExtensions.ps1 }"

Add files to Sandbox branch

Add all changed files to the sandbox branch, then commit all sandbox branch changes to the local git repository.

  1. git add -all
  2. git commit -m "First commit"

Push the Sandbox branch to Commerce Cloud

The process to push changes to sandbox is the same for production, except the changes are not automatically applied in production. If a branch does not exist on the remote repository, then it will be created when you execute the git push command.

  1. Open git bash or command line
  2. git checkout sandbox
  3. git push -u origin sandbox

Configure the website to use the theme

In the Commerce Cloud Admin Console, edit the website to use the newly configured theme.

  1. Log in to [projectidentifier].insitesandbox.com/admin
  2. Go to Websites > Edit .
  3. Click the Theme drop down and select the desired theme.

The site is now live. Go to [projectidentifier].insitesandbox.com and review the website.