- Step 1: Create a Category content model.
- Step 2: Add content entries to the Category content model.
- Step 3: Update the Product content model and add a category reference field to it.
- Step 4: Create a content entry in the Product content model with reference to the Category content model.
Step 1: Create ‘Category’ content model
We will create a category content model with the following attributes and fields. If you are not familiar with how to create a content model, please follow the Create Content Model tutorial.-
Create a content model with the following attributes:
Field Value Name Category Singular API Name Category Plural API Name Categories Content model group If you have created E-commerce group, select it, else select Ungrouped Icon (boxes) Description Demo Category content model -
Add the following field to the Category content model:
Field Field Type Name Text
Step 2: Create ‘Category’ content entries
-
From the Side Menu, Click Content Modeling > Models.
The Content Models screen opens.
- Hover over the Category content model.
- Click View entries.
-
Click + New Category.
The New Category entry screen opens.
- In the Name textbox, type Clothes.
-
Click Save & Publish.
The Publish Product confirmation screen appears.
-
Click Yes, publish!
The message “Clothes was published successfully!” displays.
Step 3: Update ‘Product’ Content Model
-
From the Side Menu, Click Content Modeling > Models.
The Content Models screen opens.
- Hover over the Product content model.
-
Click Edit.
Screen to configure the Product content model’s fields opens.
-
Drag and drop the Reference field in the Edit tab.
Field Settings - Reference screen opens.
- In the Label textbox, type Category.
- In the Content Models dropdown, click Category.
- Click the Use as a list of references button. Note: Since a product can belong to multiple categories, enabling Use as a list of references will allow you to associate multiple categories to a product.
-
Click Save Field.
Screen to configure the Product content model’s fields opens.
-
Click Save.
The message “Your content model was saved successfully!” displays.
Step 4: Create ‘Product’ content entry with a reference to ‘Category’
-
From the Side Menu, Click Content Modeling > Models.
The Content Models screen opens.
- Hover over the Product content model.
- Click View entries.
-
Click + New Product.
The New Product entry screen opens.
- In the Name textbox, type Men’s Tiro ‘21 Pants.
- In the Description textbox, type Men’s tapered track pants for versatile wear.
- In the Price textbox, type 28.
-
In the Category field:
-
Click Select an existing record.
The Select an existing record screen opens.
- In the search bar, type Clothes.
- Click the Clothes list item.
- Click Save.
-
Click Select an existing record.
-
Click Save & Publish.
The Publish Product confirmation screen appears.
-
Click Yes, publish!
The message “Men’s Trio ‘21 Pants was published successfully!” displays.

