0

I have this column i added. How can i sort it? i can click on sort, but well it doesnt really sort right.

My grid looks like:

$this->addColumn('sn_suppliers_noos', array(
            'header' => Mage::helper('purchase')->__('NOOS'),
            'index' => 'product_id',
            'renderer' => 'MDN_Purchase_Block_Widget_Column_Renderer_SupplyNeeds_Noos',
            'type' => 'number'
        ));

My renderer looks like:

public function render(Varien_Object $row)
    {       

        $value =  $row->getData($this->getColumn()->getIndex());        
        $product = Mage::getModel('catalog/product')->load($value);
        $value= $product->noos;

        return $value;
    }
2
  • Possible duplicate of this Commented Nov 7, 2016 at 15:35
  • Well its not a duplicate. What you're linkin to isnt a custom attribute, and therefore it already lies in the array and not from a renderer, which would make it alot easier :O Commented Nov 8, 2016 at 9:43

0

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.