Create a Commerce tenant and site

Current version: 9.2

To begin building a storefront, you first create a tenant and site ensuring the commerce features are enabled. A tenant is a parent item that contains a collection of sites and their shared elements and properties. A site is an item in the content tree that represents a website and consists of pages, data, designs, and partial layouts. 

Tip

You can find a Create a tenant video and Create a site video on the Discover Sitecore channel.

The structure of the storefront is important because sites within the same tenant are related and share templates and media elements.

The structure of the Storefront content tree in Sitecore.

To include commerce features in tenants and sites that you create, you must select the relevant modules in the Create a tenant and Create a new SXA site dialog boxes. Alternatively, you can add new modules to existing sites.

The following Commerce modules are available:

Module

Comments

Commerce Abandoned Cart MA Campaign

Adds a new template to sitecore/System/Marketing Control Panel/Marketing Automation Templates for abandoned carts. For each site to which you associate the abandoned cart campaign, a new campaign is created on the Marketing Automation dashboard. The name of the campaign is <sitename> Abandoned Cart. In addition, an Abandoned Cart email template is added to the Email Experience Manager.

Commerce New Order Placed MA Campaign

Adds a new template to sitecore/System/Marketing Control Panel/Marketing Automation Templates for a new order placed. For each site to which you associate the New Order Placed campaign, a new campaign is created on the Marketing Automation dashboard. The name of the campaign is <sitename> New Order Placed.

In addition, a New Order Placed email template is added to the Email Experience Manager.

Commerce Storefront Components

Installs all Commerce renderings in the Toolbox. You can use the renderings to create commerce sites.

Creates a site entry under the Commerce Storefront Control Panel, which is required by the Commerce Foundation layer and Commerce renderings.

When you select this module without selecting the Storefront Template module, only a single empty home page item is created. You can then use the Commerce renderings to build your own storefront pages.

Note

To use any part of the SXA Storefront functionality, you must select this module.

Commerce Storefront Habitat Catalog

Sets the Habitat demonstration catalog as the default catalog for the site. The Habitat catalog items are available under the Catalogs item for the site (/sitecore/content/<tenant>/<site>/Home/Catalogs), and the Habitat catalog images are available in the Media folder for the site (/sitecore/content/[tenant]/[site]/Media).

Note

The catalog is stored in the /sitecore/content/<tenant>/<site>/Home/Catalogs folder.

Requires the Commerce Storefront Components module.

Commerce Storefront Language - Danish

Commerce Storefront Language - German

Commerce Storefront Language - Japanese

For each language that you select, Sitecore adds an additional language version and includes translated default content.

Note

Requires the Commerce Storefront Template module.

Commerce Storefront Template

Installs the Storefront site template. This provides you with a pre-built storefront with standard pages and functionality using SXA and Commerce renderings, page designs, and partial designs.

Note

Requires the Commerce Storefront Components module.

Create a commerce tenant

To create a site with commerce features, you must first create a tenant that includes the Commerce Foundation feature. When you create a tenant, new templates are added to the Templates/Project/<tenant> folder. The template location is configured on the Content tab for the tenant.

The Templates location field in the Content tab.

To create a commerce tenant:

  1. On the Sitecore Launchpad, click Content Editor.

  2. In the Content Editor, right-click the Content folder, and click Insert, Tenant.

  3. Type a name for the new tenant and, in the Modules section, select the Commerce Foundation check box together with other features that you want to include.

    The Create a tenant dialog.
  4. Click OK and then click Close.

When you select the Commerce Foundation module, the tenant that is created contains templates that support commerce storefront sites in addition to the standard SXA templates.

Create a commerce site

You use the Create a new SXA site dialog box to create sites with support for commerce features. When you create a new site in the Create a new Experience Accelerator site  dialog box, a security domain and two new extranet user roles are created.

Note

To use multiple host names that point to the same site, use site groupings. In the Content Editor, go to sitecore/Content/<tenant>/<site>/Settings/Site Grouping/<site>. On the Content tab, in the Host Name field, ensure only one hostname is defined. Do not include multiple values separated by | (pipe), for example habitat.dev.local|storefront.dev.local. Instead, create multiple site definition items under Site Groupings.

To create a commerce site:

  1. In the Content Editor, right-click the commerce tenant, and click Insert, Site.

    Note

    When you create a storefront using SXA Storefront modules, on the General tab, in the Language field, select English (en). You can select one or more additional languages on the Modules tab. You can also add languages after you create the site.

  2. On the General tab, specify a name for the site.

  3. On the Modules tab, select one or more of the Commerce modules, together with other modules that you want to include.

    The Modules tab in the Create a new SXA site window.
    Note

    To deploy the full SXA Storefront with the Habitat catalog you must create a tenant and site with all commerce modules enabled.

  4. On the Theme tab, select the themes that you want to be able to apply to your site.

    If you select the Create new theme check box, a simple, unbranded new theme is created. If you have selected the Commerce Storefront Components feature on the Modules tab, the new theme includes support for the commerce renderings. The support does not include layout and the component styling is minimal. The theme includes all the component Sass files. (Some of the files are empty.) This makes it easier to export the theme using Creative Exchange.

    Note

    If you select the Commerce Storefront Template check box on the Modules tab, the Storefront Branded, Storefront Mock-up with product images, and Storefront Mock-up with mock images themes are installed.

    Commerce renderings do not fully support the Wireframe theme. Mock-up themes have been discontinued and, for this reason, have deprecated appended to the theme name. To browse to them in the Content Editor, you navigate to the sitecore/Media Library/Themes/Storefront deprecated folder. You can, however, still use these themes when you create new sites.

  5. On the Grid tab, select the bootstrap grid system. SXA Storefront supports only Bootstrap 3.

    Note

    The Commerce Storefront Template module is only compatible with the Bootstrap grid system. If you select the Commerce Storefront Template check box on the Modules tab, then you must select the Bootstrap check box on the Grid tab.

  6. Click OK.

Note

In the Commerce Engine, you configure allowed security domains with the Sitecore.Commerce.Plugin.Customers.CustomerPropertiesPolicy policy as part of the environment. You must update the configuration of the Commerce Engine environment to include the new domains that are created for each site in the SXA Storefront. The name of the new security domain that you add to the Commerce Engine policy is case sensitive, and must match exactly the name of the new site.

Remove default SXA site partial design configurations

When you create a new SXA site, SXA creates a default browser title and canonical URL as part of the partial design metadata. You must update the SXA site configuration to remove some of this default configuration, because it conflicts with the Commerce-specific partial design configuration that the Commerce modules create.

To remove the default SXA site configuration:

  1. In the Content Editor, navigate to the /sitecore/content/Sitecore/Storefront/Presentation/Partial Designs folder, right-click Metadata, and then click Experience Editor.The Experience Editor displays controls from the Metadata page in HTML format.

  2. In the <head> section of the HTLM markup, click the <title> component. The Browser Title toolbar is displayed.

  3. To remove the Browser Title component click Remove Component.

  4. In the <head> section of the HTLM markup, click the link rel="canonical" component. The CanonicalUrl toolbar is displayed.

  5. To remove the SXA site canonical URL, click Remove Component.

  6. Save your changes.

  7. Publish your changes.

Clone a commerce site

You can create a duplicate of a storefront site using the Clone script. With a cloned site, you have an exact copy of the images, content, themes, and so on. The site operates exactly as the original, with the exception of the domain name. This can be convenient when you want to create a copy of your site to test modifications, when you want to create a live backup of your site, or when you want to deliver your site across different environments.

Warning

Before running the Clone Site script, disassociate all catalogs and media folders referring to catalog media. To disassociate a catalog, in the Content Editor, navigate to the <site>/Home/Catalogs item and, in the Commerce section, clear the check box next to the catalog. For the catalog media, navigate to storefront site and, in Configuration section, clear the path defined in the Site Media Library field.

To clone a commerce site:

  1. Disassociate the catalog from the site you want to clone.

  2. Disassociate catalog media folders from the site to clone.

  3. Clone the site.

  4. Associate the catalog media folders with the newly cloned site. These can be the same as those used with the original site.

  5. Create a new catalog or clone an existing one.

  6. Associate the new or cloned catalog with the new cloned site.

  7. Assign template overrides if you want to use direct navigation.

Do you have some feedback for us?

If you have suggestions for improving this article,