Log in
Model

ProductCategoryList

Magento\Catalog\Model\ProductCategoryList

What it does

This class retrieves all category IDs that a specific product belongs to across all stores.

Developers use this when they need to determine which categories contain a particular product, such as for breadcrumb generation, product categorization checks, or building category navigation.

It queries both the main category-product table and store-specific indexer tables to provide a complete list.

Public Methods

  • getCategoryIds()
  • getCategorySelect()
  • _resetState()