2

While performing an upgrade of a Magento 1 shop, noticed a change in core class Mage_Catalog_Model_Resource_Product_Collection, within method _initSelect

The change that has happened is, that condition :

->columns(array('status' => new Zend_Db_Expr(Mage_Catalog_Model_Product_Status::STATUS_ENABLED)));

has been replaced with :

->where('e.status = ?', new Zend_Db_Expr(Mage_Catalog_Model_Product_Status::STATUS_ENABLED));

Does anyone knows the reasoning behind this change, and what could be the problems if I decide to revert to original version ? I'm asking this because, due to this change, some custom listing pages have started to throw following error now :

Column not found: 1054 Unknown column 'e.status' in 'where clause'

  • I dont know the reason for, but i guess it is to avoid "ambiguous column" problems, when joining other tables. I'd try to leave it and fix custom pages instead – sv3n Apr 30 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.