Sharing is helping.

We offer you this space to share your knowledge about Magento and learn from our experienced customers.


    Home Forums Reply To: Fatal error: Call to a member function getId() on a non-object Reply To: Fatal error: Call to a member function getId() on a non-object

    #18178

    Chelito

    Maybe you want in app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php change colmun for attribute optionstype: $this->addColumn(‘type’, array( ‘header’=> Mage::helper(‘catalog’)->__(‘Type’), ‘width’ => ’60px’, ‘index’ => ‘type_id’, ‘type’ => ‘options’, //’options’ =>Mage::getSingleton(‘catalog/product_type’)->getOptionArray(), ‘options’ => array(“simple”=>”Simple Product”), ));Additionally if this don’t fix your needs, add this in same file in collection: ->addFieldToFilter( type_id’,array( eq’=>’simple’))protected function _prepareCollection() { $store = $this->_getStore(); $collection = Mage::getModel(‘catalog/product’)->getCollection() ->addAttributeToSelect(‘sku’) ->addAttributeToSelect(‘name’) ->addAttributeToSelect(‘attribute_set_id’) ->addAttributeToSelect(‘type_id’) ->joinField(‘qty’, ‘cataloginventory/stock_item’, ‘qty’, ‘product_id=entity_id’, ‘{{table}}.stock_id=1′, ‘left’)->addFieldToFilter(‘type_id’,array(‘eq’=>’simple’));Hope this helps Sure it’s not recommended to change core files