I have created new template "My Commerce Category" by inheriting from "/sitecore/templates/Project/Sitecore/Commerce Category" and have added new section "addition" with field "notes". I did apply the custom category template on "Habitat_master" and refreshed the commerce cache so I can see the template is applied on the category.

enter image description here

But when I am building my master index, I still see the template name is "Commerce Catalog". Any idea why it is not picking up custom template?

enter image description here


You have to patch Sitecore config \App_Config\Include\Y.Commerce.Engine\Sitecore.Commerce.Engine.TemplateGenerator.config

<?xml version="1.0"?>

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
  <sitecore role:require="Standalone or ContentDelivery or ContentManagement">
    <commerceEngineTemplateGenerator type="Sitecore.Commerce.Engine.Connect.DataProvider.Configuration.TemplateGeneratorConfiguration, Sitecore.Commerce.Engine.Connect">
      <baseTemplates hint="raw:AddBaseTemplates">
        <!-- Catalog -->
        <template id="{93AF861A-B6F4-45BE-887D-D93D4B95B39D}">

        <!-- Category -->
        <template id="{4C4FD207-A9F7-443D-B32A-50AA33523661}">

        <!-- Sellable Item -->
        <template id="{225F8638-2611-4841-9B89-19A5440A1DA1}">
      <!-- Defines the catalog item to use for template generation -->
      <!-- Defines the category item to use for template generation -->
      <!-- Defines the sellable item to use for template generation -->
      <!-- Defines the bundle to use for template generation -->

I would suggest to create your custom template as a base template and add it to the baseTemplates of Category via patch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.