Class Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection

Description

Product collection

Located in /Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php (line 34)

Varien_Data_Collection_Db
   |
   --Mage_Eav_Model_Entity_Collection_Abstract
      |
      --Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract
         |
         --Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
Direct descendents
Class Description
Mage_Bundle_Model_Mysql4_Selection_Collection Bundle Selections Resource Collection
Mage_CatalogSearch_Model_Mysql4_Advanced_Collection Magento
Mage_CatalogSearch_Model_Mysql4_Fulltext_Collection Magento
Mage_CatalogSearch_Model_Mysql4_Search_Collection Magento
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection Catalog product linked products collection
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Product_Collection Catalog super product link collection
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection Catalog Product Compare Items Resource Collection
Mage_Tag_Model_Mysql4_Product_Collection Tagged Product(s) Collection
Mage_Wishlist_Model_Mysql4_Product_Collection Wishlist Product collection Deprecated because after Magento 1.4.2.0 it's impossible to use product collection in wishlist
Mage_Review_Model_Mysql4_Review_Product_Collection Review Product Collection
Mage_Reports_Model_Mysql4_Review_Product_Collection Report Products Review collection
Mage_Reports_Model_Mysql4_Product_Collection Products Report collection
Mage_Reports_Model_Mysql4_Product_Downloads_Collection Product Downloads Report collection
Mage_Reports_Model_Mysql4_Product_Index_Collection_Abstract Reports Product Index Abstract Product Resource Collection
Variable Summary
Method Summary
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addAttributeToFilter (Mage_Eav_Model_Entity_Attribute_Abstract|string $attribute, [array $condition = null], [string $joinType = 'inner'])
Mage_Catalog_Model_Entity_Product_Collection addOptionsToResult ()
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addPriceData ([int $customerGroupId = null], [int $websiteId = null])
Mage_Catalog_Model_Entity_Product_Collection addWebsiteNamesToResult ()
array getAllAttributeValues (string $attribute)
array getAllIds ([ $limit = null], [ $offset = null])
void getAllIdsCache ([ $resetCache = false])
array($value=>$count) getAttributeValueCount (string $attribute)
array getAttributeValueCountByRange (string $attribute, int $range)
mixed getMaxAttributeValue (string $attribute)
Varien_Object getNewEmptyItem ()
Varien_Db_Select getProductCountSelect ()
Varien_Db_Select getSelectCountSql ()
void getSetIds ()
bool isEnabledFlat ()
void setAllIdsCache ( $value)
void _addFinalPrice ()
void _addTaxPercents ()
void _addUrlRewrite ()
void _construct ()
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection _init (string $model, [ $entityModel = null])
void _initTables ()
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection _loadAttributes ([bool $printQuery = false], [bool $logQuery = false])
Variables
unknown_type $_addFinalPrice = false (line 84)

Is add final price to product collection flag

  • access: protected
bool $_addMinimalPrice = false (line 77)

Is add minimal price to product collection flag

  • access: protected
bool $_addTaxPercents = false (line 98)

Is add tax percents to product collection flag

  • access: protected
bool $_addUrlRewrite = false (line 63)

Is add URL rewrites to collection flag

  • access: protected
array $_allIdsCache = null (line 91)

Cache for all ids

  • access: protected
array $_flatEnabled = array() (line 42)

Catalog Product Flat is enabled cache per store

  • access: protected
bool $_isWebsiteFilter = false (line 128)
  • access: protected
array $_map = array('fields' => array(
'price' => 'price_index.price',
'final_price' => 'price_index.final_price',
'min_price' => 'price_index.min_price',
'max_price' => 'price_index.max_price',
'tier_price' => 'price_index.tier_price',
'special_price' => 'price_index.special_price',
))
(line 142)

Map of price fields

  • access: protected
array $_priceDataFieldFilters = array() (line 135)

Additional field filters, applied in _productLimitationJoinPrice()

  • access: protected
string $_productCategoryTable (line 56)

Product categories table name

  • access: protected
Zend_Db_Select $_productCountSelect = null (line 123)

Category product count select

  • access: protected
array $_productLimitationFilters = array() (line 116)

Product limitation filters

Allowed filters store_id int; category_id int; category_is_anchor int; visibility array|int; website_ids array|int; store_table string; use_price_index bool; join price index table flag customer_group_id int; required for price; customer group limitation for price website_id int; required for price; website limitation for price

  • access: protected
string $_productWebsiteTable (line 49)

Product websites table name

  • access: protected
int $_urlRewriteCategory = '' (line 70)

Add URL rewrite for category

  • access: protected

Inherited Variables

Inherited from Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract

Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract::$_storeId

Inherited from Mage_Eav_Model_Entity_Collection_Abstract

Mage_Eav_Model_Entity_Collection_Abstract::$_entity
Mage_Eav_Model_Entity_Collection_Abstract::$_filterAttributes
Mage_Eav_Model_Entity_Collection_Abstract::$_itemsById
Mage_Eav_Model_Entity_Collection_Abstract::$_joinAttributes
Mage_Eav_Model_Entity_Collection_Abstract::$_joinEntities
Mage_Eav_Model_Entity_Collection_Abstract::$_joinFields
Mage_Eav_Model_Entity_Collection_Abstract::$_selectAttributes
Mage_Eav_Model_Entity_Collection_Abstract::$_selectEntityTypes
Mage_Eav_Model_Entity_Collection_Abstract::$_staticFields
Methods
addAttributeToFilter (line 1156)

Add attribute to filter

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addAttributeToFilter (Mage_Eav_Model_Entity_Attribute_Abstract|string $attribute, [array $condition = null], [string $joinType = 'inner'])

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::addAttributeToFilter()
Add attribute filter to collection

Redefined in descendants as:
addAttributeToSelect (line 325)

Add attribute to entities in collection

If $attribute=='*' select all attributes

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addAttributeToSelect (array|string|integer|Mage_Core_Model_Config_Element $attribute, [ $joinType = false])

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::addAttributeToSelect()
Add attribute to entities in collection
addAttributeToSort (line 1313)

Add attribute to sort order

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addAttributeToSort (string $attribute, [string $dir = 'asc'])
  • string $attribute
  • string $dir

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::addAttributeToSort()
Add attribute to sort order

Redefined in descendants as:
addCategoryFilter (line 554)

Specify category filter for product collection

  • access: public
addCategoryIds (line 1685)

Add category ids to loaded items

  • access: public
addCountToCategories (line 806)

Adding product count to categories collection

  • access: public
addFilterByRequiredOptions (line 1286)

Filter products with required options

  • access: public
addFinalPrice (line 1029)

Add price data for calculate final price

  • access: public
addIdFilter (line 438)

Add collection filters by identifiers

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addIdFilter (mixed $productId, [ $exclude = false])
  • mixed $productId
  • $exclude
addMinimalPrice (line 1007)

Add minimal price data to result

  • access: public
addOptionsToResult (line 1257)

Adding product custom options to result collection

  • access: public
Mage_Catalog_Model_Entity_Product_Collection addOptionsToResult ()
addPriceData (line 1125)

Add Price Data to result

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addPriceData ([int $customerGroupId = null], [int $websiteId = null])
  • int $customerGroupId
  • int $websiteId
addPriceDataFieldFilter (line 1808)

Add field comparison expression

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addPriceDataFieldFilter (string $comparisonFormat, array $fields)
  • string $comparisonFormat: - expression for sprintf()
  • array $fields: - list of fields
addStoreFilter (line 514)

Add store availability filter. Include availability product for store website

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addStoreFilter ([mixed $store = null])
  • mixed $store

Redefined in descendants as:
addTaxPercents (line 1217)

Add requere tax percent flag for product collection

  • access: public
addTierPriceData (line 1730)

Add tier price data to loaded items

  • access: public
addUrlRewrite (line 928)

Add URL rewrites data to product If collection loadded - run processing else set flag

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addUrlRewrite ([int $categoryId = ''])
  • int $categoryId
addWebsiteFilter (line 536)

Add website filter to collection

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection addWebsiteFilter ([ $websites = null], Mage_Core_Model_Website|int|string|array $website)
addWebsiteNamesToResult (line 473)

Adding product website names to result collection Add for each product websites information

  • access: public
Mage_Catalog_Model_Entity_Product_Collection addWebsiteNamesToResult ()
applyFrontendPriceLimitations (line 1565)

Apply front-end price limitation filters to the collection

  • access: public
clear (line 1830)

Clear collection

  • access: public

Redefined in descendants as:
getAllAttributeValues (line 705)

Return all attribute values as array in form:

array( [entity_id_1] => array( [store_id_1] => store_value_1, [store_id_2] => store_value_2, ... [store_id_n] => store_value_n ), ... )

  • access: public
array getAllAttributeValues (string $attribute)
  • string $attribute: attribute code
getAllIds (line 751)

Retrive all ids for collection

  • access: public
array getAllIds ([ $limit = null], [ $offset = null])
  • $limit
  • $offset

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::getAllIds()
Retrive all ids for collection

Redefined in descendants as:
getAllIdsCache (line 1097)
  • access: public
void getAllIdsCache ([ $resetCache = false])
  • $resetCache
getAttributeValueCount (line 658)

Retrieve product count by some value of attribute

  • access: public
array($value=>$count) getAttributeValueCount (string $attribute)
  • string $attribute
getAttributeValueCountByRange (line 620)

Retrieve ranging product count for arrtibute range

  • access: public
array getAttributeValueCountByRange (string $attribute, int $range)
  • string $attribute
  • int $range
getFlatHelper (line 156)

Retrieve Catalog Product Flat Helper object

  • access: public
getMaxAttributeValue (line 587)

Retrieve max value by attribute

  • access: public
mixed getMaxAttributeValue (string $attribute)
  • string $attribute
getNewEmptyItem (line 237)

Retrieve collection empty item Redeclared for specifying id field name without getting resource model inside model

  • access: public
Varien_Object getNewEmptyItem ()
getProductCountSelect (line 770)

Retreive product count select for categories

  • access: public
Varien_Db_Select getProductCountSelect ()
getProductTypeIds (line 893)

Return array of unique product type ids in collection

  • access: public
array getProductTypeIds ()
getSelectCountSql (line 730)

Get SQL for get record count

  • access: public
Varien_Db_Select getSelectCountSql ()

Redefined in descendants as:
getSetIds (line 878)
  • access: public
void getSetIds ()
isEnabledFlat (line 167)

Retrieve is flat enabled flag Return alvays false if magento run admin

  • access: public
bool isEnabledFlat ()

Redefined in descendants as:
joinMinimalPrice (line 574)

Join minimal price attribute to result

  • access: public
joinUrlRewrite (line 908)

Joins url rewrite rules to collection

  • access: public
requireTaxPercent (line 1228)

Get require tax percent flag value

  • access: public
bool requireTaxPercent ()
setAllIdsCache (line 1112)
  • access: public
void setAllIdsCache ( $value)
  • $value
setEntity (line 252)

Set entity to use for attributes

  • access: public

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::setEntity()
Set entity to use for attributes
setGeneralDefoultQuery (line 1676)

Stub method

  • access: public
setStore (line 267)

Set Store scope for collection

  • access: public
  • mixed $store

Redefinition of:
Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract::setStore()
setVisibility (line 1298)

Set product visibility filter for enabled products

  • access: public
  • array $visibility
unsProductCountSelect (line 794)

Destruct product count select

  • access: public
_addFinalPrice (line 1065)
  • access: protected
void _addFinalPrice ()
_addMinimalPrice (line 1019)

Add minimal price to product collection

  • see: Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection::addPriceData
  • deprecated: sinse 1.3.2.2
  • access: protected
_addTaxPercents (line 1236)
  • deprecated: from 1.3.0
  • access: protected
void _addTaxPercents ()
_addUrlRewrite (line 948)

Add URL rewrites to collection

  • access: protected
void _addUrlRewrite ()
_afterLoad (line 375)

Processing collection items after loading Adding url rewrites, minimal prices, final prices, tax percents

  • access: protected

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::_afterLoad()

Redefined in descendants as:
_applyProductLimitations (line 1588)

Apply limitation filters to collection

Method allows using one time category product index table (or product website table) for different combinations of store_id/category_id/visibility filter states

Method supports multiple changes in one collection object for this parameters

  • access: protected
_applyZeroStoreProductLimitations (line 1645)

Apply limitation filters to collection base on API

Method allows using one time category product table for combinations of category_id filter states

  • access: protected
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection _applyZeroStoreProductLimitations ()
_beforeLoad (line 359)

Add tax class id attribute to select and join price rules data if needed

  • access: protected

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::_beforeLoad()

Redefined in descendants as:
_init (line 209)

Standard resource collection initalization

  • access: protected
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection _init (string $model, [ $entityModel = null])
  • string $model
  • $entityModel

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::_init()
Standard resource collection initalization
_initSelect (line 283)

Initialize collection select Redeclared for remove entity_type_id condition in catalog_product_entity we store just products

  • access: protected

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::_initSelect()

Redefined in descendants as:
_initTables (line 197)

Define product website and category product tables

  • access: protected
void _initTables ()
_joinPriceRules (line 1039)

Join prices from price rules to products collection

  • access: protected
_loadAttributes (line 309)

Load attributes into loaded entities

  • access: public
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection _loadAttributes ([bool $printQuery = false], [bool $logQuery = false])
  • bool $printQuery
  • bool $logQuery

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::_loadAttributes()
Load attributes into loaded entities
_prepareProductLimitationFilters (line 1372)

Prepare limitation filters

  • access: protected
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection _prepareProductLimitationFilters ()
_prepareStaticFields (line 223)

Prepare static entity fields

  • access: protected

Redefinition of:
Mage_Eav_Model_Entity_Collection_Abstract::_prepareStaticFields()
Prepare static entity fields
_prepareUrlDataObject (line 405)

Prepare Url Data object

  • access: protected
_productLimitationJoinPrice (line 1521)

Join Product Price Table

  • access: protected
_productLimitationJoinStore (line 1452)

Join additional (alternative) store visibility filter

  • access: protected
_productLimitationJoinWebsite (line 1401)

Join website product limitation

  • access: protected

Redefined in descendants as:

Inherited Methods

Inherited From Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract

Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract::getDefaultStoreId()
Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract::getStoreId()
Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract::setStore()
Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract::setStoreId()
Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract::_getLoadAttributesSelect()
Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract::_joinAttributeToSelect()

Inherited From Mage_Eav_Model_Entity_Collection_Abstract

Mage_Eav_Model_Entity_Collection_Abstract::__construct()
Mage_Eav_Model_Entity_Collection_Abstract::addAttributeToFilter()
Mage_Eav_Model_Entity_Collection_Abstract::addAttributeToSelect()
Mage_Eav_Model_Entity_Collection_Abstract::addAttributeToSort()
Mage_Eav_Model_Entity_Collection_Abstract::addEntityTypeToSelect()
Mage_Eav_Model_Entity_Collection_Abstract::addExpressionAttributeToSelect()
Mage_Eav_Model_Entity_Collection_Abstract::addFieldToFilter()
Mage_Eav_Model_Entity_Collection_Abstract::addItem()
Mage_Eav_Model_Entity_Collection_Abstract::addStaticField()
Mage_Eav_Model_Entity_Collection_Abstract::delete()
Mage_Eav_Model_Entity_Collection_Abstract::exportToArray()
Mage_Eav_Model_Entity_Collection_Abstract::getAllIds()
Mage_Eav_Model_Entity_Collection_Abstract::getAllIdsSql()
Mage_Eav_Model_Entity_Collection_Abstract::getAttribute()
Mage_Eav_Model_Entity_Collection_Abstract::getEntity()
Mage_Eav_Model_Entity_Collection_Abstract::getLoadedIds()
Mage_Eav_Model_Entity_Collection_Abstract::getResource()
Mage_Eav_Model_Entity_Collection_Abstract::getRowIdFieldName()
Mage_Eav_Model_Entity_Collection_Abstract::getTable()
Mage_Eav_Model_Entity_Collection_Abstract::groupByAttribute()
Mage_Eav_Model_Entity_Collection_Abstract::importFromArray()
Mage_Eav_Model_Entity_Collection_Abstract::joinAttribute()
Mage_Eav_Model_Entity_Collection_Abstract::joinField()
Mage_Eav_Model_Entity_Collection_Abstract::joinTable()
Mage_Eav_Model_Entity_Collection_Abstract::load()
Mage_Eav_Model_Entity_Collection_Abstract::removeAttributeToSelect()
Mage_Eav_Model_Entity_Collection_Abstract::save()
Mage_Eav_Model_Entity_Collection_Abstract::setEntity()
Mage_Eav_Model_Entity_Collection_Abstract::setObject()
Mage_Eav_Model_Entity_Collection_Abstract::setOrder()
Mage_Eav_Model_Entity_Collection_Abstract::setPage()
Mage_Eav_Model_Entity_Collection_Abstract::setRowIdFieldName()
Mage_Eav_Model_Entity_Collection_Abstract::toArray()
Mage_Eav_Model_Entity_Collection_Abstract::_addAttributeJoin()
Mage_Eav_Model_Entity_Collection_Abstract::_afterLoad()
Mage_Eav_Model_Entity_Collection_Abstract::_beforeLoad()
Mage_Eav_Model_Entity_Collection_Abstract::_construct()
Mage_Eav_Model_Entity_Collection_Abstract::_getAllIdsSelect()
Mage_Eav_Model_Entity_Collection_Abstract::_getAttributeConditionSql()
Mage_Eav_Model_Entity_Collection_Abstract::_getAttributeFieldName()
Mage_Eav_Model_Entity_Collection_Abstract::_getAttributeTableAlias()
Mage_Eav_Model_Entity_Collection_Abstract::_getLoadAttributesSelect()
Mage_Eav_Model_Entity_Collection_Abstract::_init()
Mage_Eav_Model_Entity_Collection_Abstract::_initSelect()
Mage_Eav_Model_Entity_Collection_Abstract::_joinAttributeToSelect()
Mage_Eav_Model_Entity_Collection_Abstract::_loadAttributes()
Mage_Eav_Model_Entity_Collection_Abstract::_loadEntities()
Mage_Eav_Model_Entity_Collection_Abstract::_prepareStaticFields()
Mage_Eav_Model_Entity_Collection_Abstract::_reset()
Mage_Eav_Model_Entity_Collection_Abstract::_setItemAttributeValue()

Documentation generated on Fri, 11 Feb 2011 16:58:08 +0200 by phpDocumentor 1.4.3