This article explains the process for creating a new theme for B2B Commerce Cloud. To create a theme, you need to complete the following steps:
- Create the theme project
- Assign the theme to a website
Before You Start
Make sure that you have completed the following:
- Download and install B2B Commerce Cloud SDK (see B2B Commerce Cloud Environment Setup for Developers for instructions)
Create Theme Project
- In the directory where the SDK was installed, go to the ~\src directory.
- Run the createTheme.ps1 PowerShell script. Use the name of your theme as the first and only argument.
Use Visual Studio to open the B2B Commerce.sln solution file. The PowerShell script created a separate project for your theme and named it using your theme name.
Build the solution.
Assign Theme to Website
- Log into the Admin Console.
- Navigate to Websites in the left navigation.
- Click the Edit button next to the Website to which you want to assign your theme.
- On the Details finger tab, use the Theme dropdown to select your theme.
- Click Save.
- Navigate to the Storefront for the Website. The Storefront is now using your theme:
Each website in B2B Commerce can only be assigned a single theme, but the platform can handle multiple themes. To add another theme to the platform, simply repeat the process above starting at Create Theme Project. For each new theme, remember to use a unique theme name.
Last updated: Dec 11, 2020