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:
git checkout Sandbox
git fetch upstream --tags
git merge 4.3.2.12345
Add or update files
- Open git bash or command line
git checkout sandbox
- 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.
git add -all
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.
- Open git bash or command line
git checkout sandbox
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.
- Log in to [projectidentifier].insitesandbox.com/admin
- Go to Websites > Edit .
- Click the Theme drop down and select the desired theme.
The site is now live. Go to [projectidentifier].insitesandbox.com
and review the website.
Updated about 1 year ago