For example, you may want to manage information about the brands that are sold on your site and use that information to organize how product information is displayed.

This is part 1 in the series and will show you how to add an new entity named “Brand” to the system and allow business users to create, update and delete brands. Adding a new entity is really simple, this post focuses more on how to manage this entity from within the business tools.

For instance, you may be selling sports caps and want to store information about the brands you sell such as 47 brand or New Era. The brands will have their own descriptions, images and be related to the SellableItems. Eventually you may use this information to create a “Brand” landing page on the front end of the site (later posts will show this).

Most of the time it doesn’t make sense to store information regarding your SellableItems by duplicating that information on each SellableItem. The better approach is to create a new entity that stores this information and relate it to the SellableItem (basic relational database stuff really).

The following is covered in this post :-

  1. Add new entity to the engine
  2. Add the UI components to the Business Tools to allow users to manage new Brands.

Future posts will build on this foundation including how to add the new brand entity as content within the CMS.

The end result will look like the image at the start of the post.

Step 1 – Create new plugin

  • In the Commerce Engine SDK create a new plugin and reference it from the engine
  • Add the following code to create the new entity and the pipelines

In folder “Entities” create…

In folder named “Pipelines\Blocks” create…

In the root of your project add…

Your solutions should look like this…

Brands project.png

When you launch the business tools you should now be able to manage your brands within the UI.