Categories are where your products live. They are important because they are the main tool buyers use to navigate the Product List Page (PLP), and they systematize the store for the convenience of customers. Learn how to work with Magento (Adobe Commerce) categories in this quick read.
Where to find the category structure of the catalog in Magento
You can find Category information under the Catalog section in the admin panel.
To see a category tree on the Admin sidebar, go to Catalog > Categories.
For the category to really be unique and describe the products most closely to reality, an extended category setting is required.
How to add a CMS block to the category page
Page elements are mostly blocks that can be easily managed. These blocks—generally referred to as content blocks, static blocks, or CMS blocks—are modular units that can display fixed (text, images, video) or dynamic information (using widgets) and be placed almost anywhere on a page.
To add content blocks to a category page, follow these steps:
- On the Admin sidebar, go to Catalog > Categories.
- In the category tree, select the category that you want to edit.
- Expand the Content section.
- For Add the CMS block, select a block you want to add.
- Expand the Display Settings section.
- Set the Display Mode to one of the following:
Static block only
Static block and products
- When complete, click Save and review the block display on the storefront (requires cache refresh).
How to set the category permissions
Category access can be limited to specific customer groups or restricted entirely. Category Permissions is not enabled by default, and changing its settings will have a global effect on categories. You can control which customer groups can browse the categories, view product prices, and add items to the cart.
To edit Category Permissions, follow these steps:
- Expand the Category Permissions section.
- For a multi-site installation, choose the Website where the category permissions apply.
- Choose the Customer Group where the category permissions apply.
- If needed, you can choose a Shared Catalog instead.
- Set the following permissions as needed:
- Browsing Category
- Display Product Prices
- Add to Cart
- To add another permission rule, click New Permission and repeat the process.
Where the category data is stored in the database
Once a category is created from the Magento (Adobe Commerce) admin panel, the created category data will be inserted into the catalog_category_entity
table in Magento.
A complete list of the columns placed within the catalog_category_entity
table can be seen below:
entity_id | The unique ID of the entity |
attribute_set_id | The ID of the attribute set |
parent_id | The ID of the parent category |
created_at | The date the category was created |
updated_at | The date the category was last updated |
path | The path of the categories used with category IDs separated by a “/” (e.g., 1/2/3) |
position | The position of the category within its level in the tree structure |
children_count | The number of children categories that the category contains |
level | The hierarchy level that the category belongs to |
Levels:
level 0 – global top-level category; not visible in any way on either FE or BE
level 1 – top-level “root” category of a specific store; different stores can have different root categories
level 2 – top-level categories for a specific store; usually visible in the menu on FE, etc.
As the catalog_category
is an EAV entity, there are, of course, other tables, such as catalog_category_entity_text
, catalog_category_entity_varchar
, etc.
Path
, level, parent_id
, children_count
are all system fields that get automatically defined or updated on category save.
How to make a migration patch to create or edit a category programmatically
Products are created programmatically with migration patches. A patch can create or update products when setup:upgrade
is run and on deployment. We use migration patches so that the changes to the database are executed in all environments, including everyone’s local environments.
Need help with Magento (Adobe Commerce) development? scandiweb is the largest certified Magento developer team in the world. Ask us how you can get a dedicated eCommerce team and get the hassle out of web development, design, and the whole eCommerce optimization process. Or send us a message about your specific needs.
Share on: