Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Solved: Upgrade from 1.4.2.0 to 1.7.0.2: Can’t retrieve entity config cataloginventory/stock_status
 
Jellej
Jr. Member
 
Total Posts:  8
Joined:  2011-06-19
 

Hey Guys,

Anyone have any idea how to solve this error?

Can’t retrieve entity config: cataloginventory/stock_status

I get this when trying to Manage products / Categories or Open a sale item,, or just go to a category/product page…

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jellej
Jr. Member
 
Total Posts:  8
Joined:  2011-06-19
 

So I found the solution to this problem by debugging.

Edit the file (or better yet, copy it to local folder) /app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Status.php

Look for the following function

public function getProductStatus($productIds, $websiteId, $stockId = 1)

You will see this

public function getProductStatus($productIds$websiteId$stockId 1)
    {
        
if (!is_array($productIds)) {
            $productIds 
= array($productIds);
        
}

        $select 
$this->_getReadAdapter()->select()
            ->
from($this->getMainTable(), array('product_id''stock_status'))
            ->
where('product_id IN(?)'$productIds)
            ->
where('stock_id=?', (int)$stockId)
            ->
where('website_id=?', (int)$websiteId);
        return 
$this->_getReadAdapter()->fetchPairs($select);
    
}

Change it to:

public function getProductStatus($productIds$websiteId$stockId 1)
    
{
        
if (!is_array($productIds)) {
            $productIds 
= array($productIds);
        
}

        $select 
$this->_getReadAdapter()->select()
            ->
from('cataloginventory_stock_status', array('product_id''stock_status'))
            ->
where('product_id IN(?)'$productIds)
            ->
where('stock_id=?', (int)$stockId)
            ->
where('website_id=?', (int)$websiteId);
        return 
$this->_getReadAdapter()->fetchPairs($select);
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top