Log in
Collection

Product\Collection

Magento\Catalog\Model\ResourceModel\Product\Collection

What it does

This class manages collections of product entities in Magento 2, providing methods to filter, sort, and retrieve product data efficiently.

Developers use it to load product lists with various conditions like category filters, price ranges, visibility settings, and store scopes.

It's essential for building product listings, search results, and catalog operations throughout the Magento storefront and admin.

Public Methods

  • _resetState()
  • getCatalogPreparedSelect()
  • getPriceExpression()
  • getAdditionalPriceExpression()
  • getCurrencyRate()
  • getFlatState()
  • isEnabledFlat()
  • getNewEmptyItem()
  • setEntity()
  • setStore()
  • _loadAttributes()
  • addAttributeToSelect()
  • addIdFilter()
  • addWebsiteNamesToResult()
  • load()
  • addStoreFilter()
  • addWebsiteFilter()
  • getLimitationFilters()
  • addCategoryFilter()
  • addCategoriesFilter()
  • joinMinimalPrice()
  • getMaxAttributeValue()
  • getAttributeValueCountByRange()
  • getAttributeValueCount()
  • getAllAttributeValues()
  • getSelectCountSql()
  • getAllIds()
  • getProductCountSelect()
  • unsProductCountSelect()
  • addCountToCategories()
  • getSetIds()
  • getProductTypeIds()
  • joinUrlRewrite()
  • addUrlRewrite()
  • addMinimalPrice()
  • addFinalPrice()
  • getAllIdsCache()
  • setAllIdsCache()
  • addPriceData()
  • addAttributeToFilter()
  • addTaxPercents()
  • requireTaxPercent()
  • addOptionsToResult()
  • addFilterByRequiredOptions()
  • setVisibility()
  • addAttributeToSort()
  • applyFrontendPriceLimitations()
  • addCategoryIds()
  • addTierPriceData()
  • addTierPriceDataByGroupId()
  • addPriceDataFieldFilter()
  • addMediaGalleryData()
  • getProductEntityMetadata()
  • clear()
  • setOrder()
  • getMaxPrice()
  • getMinPrice()
  • getPriceStandardDeviation()
  • getPricesCount()