Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/code/core/Mage/Catalog/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,10 @@ public function hasStockItem()
}

/**
* @param Mage_CatalogInventory_Model_Stock_Item $stockItem
* @param Varien_Object|Mage_CatalogInventory_Model_Stock_Item $stockItem
* @return $this
*/
public function setStockItem(Mage_CatalogInventory_Model_Stock_Item $stockItem)
public function setStockItem($stockItem)
{
$this->_stockItem = $stockItem;
return $this;
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/CatalogInventory/Model/Stock/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public function addStockStatusToProducts($productCollection, $websiteId = null,

/* back compatible stock item */
foreach ($productCollection as $product) {
$object = new Varien_Object(array('is_in_stock' => $product->getData('is_salable')));
$object = Mage::getModel('cataloginventory/stock_item', ['is_in_stock' => $product->getData('is_salable')]);
$product->setStockItem($object);
}

Expand Down