Log in
Model

Config

Magento\Catalog\Model\Config

What it does

This class manages catalog configuration data in Magento 2, providing access to product attributes, attribute sets, attribute groups, and product types.

Developers use it to retrieve attributes used in product listings, get available sort-by options, and translate between IDs and names for catalog entities.

It's commonly used when working with product data, custom product listing pages, or catalog import/export operations.

Public Methods

  • setStoreId()
  • getStoreId()
  • loadAttributeSets()
  • getAttributeSetName()
  • getAttributeSetId()
  • loadAttributeGroups()
  • getAttributeGroupName()
  • getAttributeGroupId()
  • loadProductTypes()
  • getProductTypeId()
  • getProductTypeName()
  • getSourceOptionId()
  • getProductAttributes()
  • getAttributesUsedInProductListing()
  • getAttributesUsedForSortBy()
  • getAttributeUsedForSortByArray()
  • getProductListDefaultSortBy()