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";
    }
}
  • any error in error log? – Qaisar Satti Aug 15 '16 at 9:12
  • no. no any error. – Ajay Patel Aug 15 '16 at 9:27
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',
));
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 module name.

  • not any error its display only empty cell – Ajay Patel Aug 15 '16 at 9:28
  • Try this Mage::helper('DropshipPo')->__('Cateogry') – Sourav Aug 15 '16 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 – Ajay Patel Aug 15 '16 at 9:38
  • $block = $this->getLayout()->createBlock('dropshippo/adminhtml_reportItem_bundle'); echo get_class($block); What is output of this ? can you paste here. – Sourav Aug 15 '16 at 9:38
  • Try this Mage::helper('dropshippo')->__('Cateogry') – Sourav Aug 15 '16 at 9:41

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.