Open gebrial opened 8 years ago
@gebrial I'm happy to take a PR for this, but I don't use this report myself so I won't get to it soon due to other pressing commitments.
@rjocoleman no problem. I'll try to find a better solution but I thought it was important to make a note of this in case others came across the same problem.
Problem is in /app/code/core/Mage/Reports/Model/Resource/Product/Lowstock/Collection.php Line 239 $this->getSelect()->where('qty < ?', $notifyStockExpr);
Should be: $where = $this->_inventoryItemTableAlias . '.qty < ?'; $this->getSelect()->where($where, $notifyStockExpr);
So you have to extend Mage_Reports_Model_Resource_Product_Lowstock_Collection and override: public function useNotifyStockQtyFilter
I will put in a pull request.
In the admin panel, when opening the page at reports->products->"low stock", we get an error page. The report says (among other things):
A quick fix for this is to go to the class Etailer_Backorders_Model_Observer_Adminhtml and comment out the lines in the function joinFieldsToCollection. I've seen other solutions to this problem where they define a 'filter_index' when joining, but I'm not sure how to implement that here.