Class Mage_CatalogInventory_Model_Stock_Status

Description

CatalogInventory Stock Status per website Model

Located in /CatalogInventory/Model/Stock/Status.php (line 34)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_CatalogInventory_Model_Stock_Status
Class Constant Summary
Variable Summary
Method Summary
Mage_CatalogInventory_Model_Stock_Status addStockStatusToProducts (Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection $productCollection, [int|null $websiteId = null], [int|null $stockId = null])
Mage_CatalogInventory_Model_Stock_Status assignProduct ( $product, [int $stockId = 1], [int $stockStatus = null])
array getProductData (int|array $productIds, int $websiteId, [int $stockId = 1])
array getProductStatus (int|array $productIds, int $websiteId, [int $stockId = 1])
array getProductsType (array|int $productIds)
string|false getProductType (int $productId)
int getWebsiteDefaultStoreId (int $websiteId)
array getWebsites ([ $websiteId = null])
Mage_CatalogInventory_Model_Stock_Status prepareCatalogProductIndexSelect ( $select, string|Zend_Db_Expr $entityField, string|Zend_Db_Expr $websiteField)
Mage_CatalogInventory_Model_Stock_Status saveProductStatus (int $productId, int $status, [float $qty = 0], [int $stockId = 1], [int|null $websiteId = null])
Mage_CatalogInventory_Model_Stock_Status updateStatus (int $productId, [string $productType = null], [int $websiteId = null])
void _construct ()
Mage_CatalogInventory_Model_Stock_Status _processChildren (int $productId, string $productType, [float $qty = 0], [int $status = self::STATUS_IN_STOCK], [int $stockId = 1], [int $websiteId = null])
Mage_CatalogInventory_Model_Stock_Status _processParents (int $productId, [int $stockId = 1], [int $websiteId = null])
Variables
Methods
addIsInStockFilterToCollection (line 526)

Add only is in stock products filter to product collection

  • access: public
addStockStatusToProducts (line 457)

Add information about stock status to product collection

  • access: public
Mage_CatalogInventory_Model_Stock_Status addStockStatusToProducts (Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection $productCollection, [int|null $websiteId = null], [int|null $stockId = null])
addStockStatusToSelect (line 495)

Add stock status to prepare index select

  • access: public
Mage_CatalogInventory_Model_Stock_Status addStockStatusToSelect ( $select,  $website)
assignProduct (line 192)

Assign Stock Status to Product

  • access: public
Mage_CatalogInventory_Model_Stock_Status assignProduct ( $product, [int $stockId = 1], [int $stockStatus = null])
changeItemStatus (line 168)

Change Stock Item status process

  • access: public
getProductData (line 407)

Retrieve Product(s) Data array

  • access: public
array getProductData (int|array $productIds, int $websiteId, [int $stockId = 1])
  • int|array $productIds
  • int $websiteId
  • int $stockId
getProductStatus (line 394)

Retrieve Product(s) status

  • access: public
array getProductStatus (int|array $productIds, int $websiteId, [int $stockId = 1])
  • int|array $productIds
  • int $websiteId
  • int $stockId
getProductStatusEnabled (line 157)

Retrieve Product Status Enabled Constant

  • access: public
int getProductStatusEnabled ()
getProductStatusModel (line 137)

Retrieve Catalog Product Status Model

  • access: public
Mage_Catalog_Model_Product_Status getProductStatusModel ()
getProductsType (line 444)

Retrieve Products Type as array Return array as key product_id, value type

  • access: public
array getProductsType (array|int $productIds)
  • array|int $productIds
getProductType (line 428)

Retrieve Product Type

  • access: public
string|false getProductType (int $productId)
  • int $productId
getProductTypeInstance (line 89)

Retrieve Product Type Instance By Product Type

  • access: public
Mage_Catalog_Model_Product_Type_Abstract getProductTypeInstance (string $productType)
  • string $productType
getProductTypeInstances (line 68)

Retrieve Product Type Instances as key - type code, value - instance model

  • access: public
array getProductTypeInstances ()
getResource (line 417)

Retrieve resource model wraper

  • access: public

Redefinition of:
Mage_Core_Model_Abstract::getResource()
Retrieve model resource
getStockItemModel (line 147)

Retrieve CatalogInventory empty Stock Item model

  • access: public
getWebsiteDefaultStoreId (line 123)

Retrieve Default website store Id

  • access: public
int getWebsiteDefaultStoreId (int $websiteId)
  • int $websiteId
getWebsites (line 103)

Retrieve website models

  • access: public
array getWebsites ([ $websiteId = null])
  • $websiteId
prepareCatalogProductIndexSelect (line 509)

Add stock status limitation to catalog product price index select object

  • access: public
Mage_CatalogInventory_Model_Stock_Status prepareCatalogProductIndexSelect ( $select, string|Zend_Db_Expr $entityField, string|Zend_Db_Expr $websiteField)
  • Varien_Db_Select $select
  • string|Zend_Db_Expr $entityField
  • string|Zend_Db_Expr $websiteField
rebuild (line 211)

Rebuild stock status for all products

  • access: public
Mage_CatalogInventory_Model_Stock_Status rebuild ([int $websiteId = null])
  • int $websiteId
saveProductStatus (line 380)

Save product status per website if website is null, saved for all websites

  • access: public
Mage_CatalogInventory_Model_Stock_Status saveProductStatus (int $productId, int $status, [float $qty = 0], [int $stockId = 1], [int|null $websiteId = null])
  • int $productId
  • int $status
  • float $qty
  • int $stockId
  • int|null $websiteId
updateStatus (line 237)

Update product status from stock item

  • access: public
Mage_CatalogInventory_Model_Stock_Status updateStatus (int $productId, [string $productType = null], [int $websiteId = null])
  • int $productId
  • string $productType
  • int $websiteId
_construct (line 57)

Init resource model

  • access: protected
void _construct ()
_processChildren (line 269)

Process children stock status

  • access: protected
Mage_CatalogInventory_Model_Stock_Status _processChildren (int $productId, string $productType, [float $qty = 0], [int $status = self::STATUS_IN_STOCK], [int $stockId = 1], [int $websiteId = null])
  • int $productId
  • string $productType
  • float $qty
  • int $status
  • int $stockId
  • int $websiteId
_processParents (line 336)

Process Parents by child

  • access: protected
Mage_CatalogInventory_Model_Stock_Status _processParents (int $productId, [int $stockId = 1], [int $websiteId = null])
  • int $productId
  • int $stockId
  • int $websiteId

Inherited Methods

Inherited From Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::afterCommitCallback()
Mage_Core_Model_Abstract::afterLoad()
Mage_Core_Model_Abstract::cleanModelCache()
Mage_Core_Model_Abstract::clearInstance()
Mage_Core_Model_Abstract::delete()
Mage_Core_Model_Abstract::getCacheIdTags()
Mage_Core_Model_Abstract::getCacheTags()
Mage_Core_Model_Abstract::getCollection()
Mage_Core_Model_Abstract::getEntityId()
Mage_Core_Model_Abstract::getId()
Mage_Core_Model_Abstract::getIdFieldName()
Mage_Core_Model_Abstract::getResource()
Mage_Core_Model_Abstract::getResourceCollection()
Mage_Core_Model_Abstract::getResourceName()
Mage_Core_Model_Abstract::isObjectNew()
Mage_Core_Model_Abstract::load()
Mage_Core_Model_Abstract::save()
Mage_Core_Model_Abstract::setId()
Mage_Core_Model_Abstract::_afterDelete()
Mage_Core_Model_Abstract::_afterDeleteCommit()
Mage_Core_Model_Abstract::_afterLoad()
Mage_Core_Model_Abstract::_afterSave()
Mage_Core_Model_Abstract::_afterSaveCommit()
Mage_Core_Model_Abstract::_beforeDelete()
Mage_Core_Model_Abstract::_beforeLoad()
Mage_Core_Model_Abstract::_beforeSave()
Mage_Core_Model_Abstract::_clearData()
Mage_Core_Model_Abstract::_clearReferences()
Mage_Core_Model_Abstract::_getEventData()
Mage_Core_Model_Abstract::_getResource()
Mage_Core_Model_Abstract::_hasModelChanged()
Mage_Core_Model_Abstract::_init()
Mage_Core_Model_Abstract::_protectFromNonAdmin()
Mage_Core_Model_Abstract::_setResourceModel()
Class Constants
STATUS_IN_STOCK = 1 (line 37)
STATUS_OUT_OF_STOCK = 0 (line 36)

Documentation generated on Fri, 11 Feb 2011 17:13:15 +0200 by phpDocumentor 1.4.3