Ejemplo n.º 1
0
 /**
  * Add join for catalog in stock field to product collection
  *
  * @param Mage_Catalog_Model_Entity_Product_Collection $productCollection
  * @return Mage_CatalogInventory_Model_Mysql4_Stock_Item
  */
 public function addCatalogInventoryToProductCollection($productCollection)
 {
     $productCollection->joinField('inventory_in_stock', 'cataloginventory/stock_item', 'is_in_stock', 'product_id=entity_id', null, 'left');
     return $this;
 }