Skip to main content
deleted 33 characters in body
Source Link

I found another way to solve this problem.

I have written the seperate function in helper file as,

public function color()
        {
            $attribute_color = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color');
    $allOptions_color = $attribute_color->getSource()->getAllOptions(true, true);
    foreach ($allOptions_color as $color_instance) {
        $color[$color_instance['value']] = $color_instance['label'];
    }
    return $color;
       }

and I call this function in grid.php as

$this->addColumn('color', array(
        'header'    =>Mage::helper('reports')->__('Product Color'),
        'sortable'  =>false,
        'index'     =>'color',
        'type'  => 'options',
        'options'=> Mage::helper('reports')->color()
    ));

Finally I got the solution :)

I found another way to solve this problem.

I have written the seperate function in helper file as,

public function color()
        {
            $attribute_color = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color');
    $allOptions_color = $attribute_color->getSource()->getAllOptions(true, true);
    foreach ($allOptions_color as $color_instance) {
        $color[$color_instance['value']] = $color_instance['label'];
    }
    return $color;
       }

and I call this function in grid.php as

$this->addColumn('color', array(
        'header'    =>Mage::helper('reports')->__('Product Color'),
        'sortable'  =>false,
        'index'     =>'color',
        'type'  => 'options',
        'options'=> Mage::helper('reports')->color()
    ));

Finally I got the solution :)

I found another way to solve this problem.

I have written the seperate function in helper file as,

public function color()
        {
            $attribute_color = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color');
    $allOptions_color = $attribute_color->getSource()->getAllOptions(true, true);
    foreach ($allOptions_color as $color_instance) {
        $color[$color_instance['value']] = $color_instance['label'];
    }
    return $color;
       }

and I call this function in grid.php as

$this->addColumn('color', array(
        'header'    =>Mage::helper('reports')->__('Product Color'),
        'sortable'  =>false,
        'index'     =>'color',
        'type'  => 'options',
        'options'=> Mage::helper('reports')->color()
    ));
Source Link

I found another way to solve this problem.

I have written the seperate function in helper file as,

public function color()
        {
            $attribute_color = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color');
    $allOptions_color = $attribute_color->getSource()->getAllOptions(true, true);
    foreach ($allOptions_color as $color_instance) {
        $color[$color_instance['value']] = $color_instance['label'];
    }
    return $color;
       }

and I call this function in grid.php as

$this->addColumn('color', array(
        'header'    =>Mage::helper('reports')->__('Product Color'),
        'sortable'  =>false,
        'index'     =>'color',
        'type'  => 'options',
        'options'=> Mage::helper('reports')->color()
    ));

Finally I got the solution :)