2

I am getting this error when trying to filter the sales grid by store. I can fix this error by altering app\code\core\Mage\Adminhtml\Block\Sales\Order\Grid.phpand replacing

if (!Mage::app()->isSingleStoreMode()) {
    $this->addColumn('store_id', array(
        'header'    => Mage::helper('sales')->__('Purchased From (Store)'),
        'index'     => 'store_id',
        'type'      => 'store',
        'store_view'=> true,
        'display_deleted' => true,
    )); }

with

if (!Mage::app()->isSingleStoreMode()) {
    $this->addColumn('store_id', array(
        'header'    => Mage::helper('sales')->__('Purchased From (Store)'),
        'index'     => 'main_table.store_id',
        'type'      => 'store',
        'store_view'=> true,
        'display_deleted' => true,
    ));
}

However, I would like to understand why this is happening in the first place. Also if I edit Grid.php like that, all my store view names will include [deleted] - this I don't understand at all...

  • 1
    I still don't know why this is happening but if I edit Grid.php and instead of changing the 'index' line add this line 'filter_index' => 'main_table.store_id', it will work. – loeffel Dec 28 '16 at 13:00
  • check grid is overriding some other extensions or not – sandip Dec 28 '16 at 13:44

Your Answer

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

Browse other questions tagged or ask your own question.