0

I don't know what is the problem with my code.

Gird

    $this->addColumn('category', array(
                'header'    => Mage::helper('udropship')->__('Cateogry'),
                'index'     => 'category',
                'sortable'  => false,
                'filter'    => false,
                'renderer'  => 'Unirgy_DropshipPo_Block_Adminhtml_ReportItem_Bundle',
));

Renderer Function

class Unirgy_DropshipPo_Block_Adminhtml_ReportItem_Bundle extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
        return "work";
    }
}
2
  • any error in error log? Commented Aug 15, 2016 at 9:12
  • no. no any error. Commented Aug 15, 2016 at 9:27

2 Answers 2

1

Remove index from addcolumn because there is no field called as category in your collection

 $this->addColumn('category', array(
                'header'    => Mage::helper('udropship')->__('Cateogry'),

                'sortable'  => false,
                'filter'    => false,
                'renderer'  => 'Unirgy_DropshipPo_Block_Adminhtml_ReportItem_Bundle',
));
1
  • your most welcome Commented Aug 15, 2016 at 9:47
0

You are getting the error like this Mage_Udropship_Helper_Data not found.

Error in this line

'header' => Mage::helper('udropship')->__('Cateogry'),

Mage::helper('DropshipPo') will be use instead udropship.
udropship is not a module name.

8
  • not any error its display only empty cell Commented Aug 15, 2016 at 9:28
  • Try this Mage::helper('DropshipPo')->__('Cateogry') Commented Aug 15, 2016 at 9:36
  • Mage::helper('DropshipPo')->__('Cateogry') after this i got the error Fatal error: Class 'Mage_DropshipPo_Helper_Data' not found in /var/www/html/app/Mage.php on line 547 Commented Aug 15, 2016 at 9:38
  • $block = $this->getLayout()->createBlock('dropshippo/adminhtml_reportItem_bundle'); echo get_class($block); What is output of this ? can you paste here. Commented Aug 15, 2016 at 9:38
  • Try this Mage::helper('dropshippo')->__('Cateogry') Commented Aug 15, 2016 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.