This section describes how you extend the Sellable Item entities through components. You can extend the other catalog system entities in a similar way.
For more details on the Commerce plugin, refer to the Creating your first plugin section in the Sitecore Experience Commerce Developer's Guide. The code snippets referenced in this article are included in the Plugin.Sample.Notes.zip sample project.

To extend the Sellable Item entity, create a new component class with the properties that will be persisted as a part of the Sellable Item:

To allow users to provide content for these properties, the existing views for sellable items and their variants can be extended by creating a new entity view and registering it in the IGetEntityViewPipeline.

When creating entity views, you should keep in mind that all blocks in that pipeline execute when an entity view is requested, so it is your responsibility to make sure that your block only acts for specific view names, action names, or entity types.

The following code sample handles the Sellable Item views and adds the properties from the previously created component as view properties that are rendered in the business tools.

If you want to make your new properties available in your Storefront and you handled the Connect-specific views as mentioned above, open the Content Editor of your Sitecore XP instance and perform the following steps: