0

I've been able to filter custom added column like 'seller name ' its get from seller id of product.

other filters are working.

$this->addColumn('seller_id', array(
        'header' => Mage::helper('marketplace')->__('Seller Names'),            
        'index' => 'seller_id',
        'filter'    => true, 
        'sortable'  => true,            
       // 'renderer'  => 'marketplace/adminhtml_productrequest_renderer_sellername'
    ));

when I try to use the column to search I get an error like this.

exception 'Mage_Core_Exception' with message 'Invalid block type: 1' in C:\wamp\www\magento\app\Mage.php:595 Stack trace: C:\wamp\www\magento\app\code\core\Mage\Core\Model\Layout.php(495): Mage::throwException('Invalid block t...') 1 C:\wamp\www\magento\app\code\core\Mage\Core\Model\Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance(true, Array) 2 C:\wamp\www\magento\app\code\core\Mage\Adminhtml\Block\Widget\Grid\Column.php(369): Mage_Core_Model_Layout->createBlock(true) 3 C:\wamp\www\magento\app\code\core\Mage\Adminhtml\Block\Widget\Grid\Column.php(51): Mage_Adminhtml_Block_Widget_Grid_Column->getFilter() 4 C:\wamp\www\magento\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php(314): Mage_Adminhtml_Block_Widget_Grid_Column->setGrid(Object(Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid)) 5 C:\wamp\www\magento\app\code\local\Mage\Adminhtml\Block\Sales\Order\Create\Search\Grid.php(157): Mage_Adminhtml_Block_Widget_Grid->addColumn('seller_id', Array) 6 C:\wamp\www\magento\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php(624):

0

Suppose,your Marketplace module name is Abc_Marketplace.

As per as magento,there should be a class exit in your module

Abc_Marketplace_Block_Adminhtml_Productrequest_Renderer_Sellername Which may be does not exit in your system that reason it show error.

May class name is wrong or may path location is wrong.for those reason you got error.

As per your comment,your block type prefix is mp.

<blocks>
      <mp><!-- this called as block type prefix  for Abc_Markeplace module -->
          <class>Abc_Marketplace_Block</class>
      </mp>
      ...
    </blocks>

So render class block type is

'renderer' => 'mp/adminhtml_productrequest_renderer_sellername'

  • Abc_Marketplace_Block_Adminhtml_Productrequest_Renderer_Sellername is there in Adminhtml based on this class only I'm getting seller name. – GR Rajkumar Sep 29 '15 at 11:35
  • Changed 'renderer' => 'abc_marketplace/adminhtml_productrequest_renderer_sellername' showing fatal error Fatal error: Call to a member function setColumn() on a non-object. ../Adminhtml\Block\Widget\Grid\Column.php but when i've been changed 'filter' => true, to false there is no error. – GR Rajkumar Sep 29 '15 at 12:10
  • can you please show your marketplace config.xml code – Amit Bera Sep 29 '15 at 12:15
  • this not config.xml code.. i asking about your marketplace etc/config.xml fi;r – Amit Bera Sep 29 '15 at 12:24
  • its big file which part you need to change – GR Rajkumar Sep 29 '15 at 12:27

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.