Magento – How to increase page view to 500 on Sales Order Grid

gridgrid-serlizationmagento-1.7sales

Mage 1.7.0.2 CE

I am having a problem updating the grid.php to increase the default limit which is currently at 200. I have edited the grid.phtml file to display 500 in the dropdown on the Sales Order Grid but I can't get it to work, it just loads the dashboard of Mage when I click on it.

So I'm pretty sure I need to edit the grid.php here:

/app/code/local/Mage/Adminhtml/Catalog/Product/Grid.php 

To allow for an increase in the default limit. However when I add this:

public function __construct()
{
    parent::__construct();
    $this->setDefaultLimit(100);

It breaks Mage with a 500 error.

So I'd like to know what I need to do to override the default limit of 200, so I can increase it to 500. It's important since my employer uses the sales order grid to process orders.

Thanks~

Best Answer

Edit the grid.phtml file located:

.../app/design/adminhtml/default/default/template/widget/grid.phtml

At line 81-87:

<select name="<?php echo $this->getVarNameLimit() ?>” onchange="<?php echo $this->getId() ?>JsObject.loadByElement(this)"> 
  <option value="20"<?php if($this->getCollection()->getPageSize()==20): ?> selected="selected"<?php endif; ?>>20</option> 
  <option value="30"<?php if($this->getCollection()->getPageSize()==30): ?> selected="selected"<?php endif; ?>>30</option> 
  <option value="50"<?php if($this->getCollection()->getPageSize()==50): ?> selected="selected"<?php endif; ?>>50</option> 
  <option value="100"<?php if($this->getCollection()->getPageSize()==100): ?> selected="selected"<?php endif; ?>>100</option> 
  <option value="200"<?php if($this->getCollection()->getPageSize()==200): ?> selected="selected"<?php endif; ?>>200</option> 
</select>

Changing the above to the below for example:

<select name="<?php echo $this->getVarNameLimit() ?>” onchange="<?php echo $this->getId() ?>JsObject.loadByElement(this)"> 
  <option value="200"<?php if($this->getCollection()->getPageSize()==200): ?> selected="selected"<?php endif; ?>>200</option> 
  <option value="300"<?php if($this->getCollection()->getPageSize()==300): ?> selected="selected"<?php endif; ?>>300</option> 
  <option value="500"<?php if($this->getCollection()->getPageSize()==500): ?> selected="selected"<?php endif; ?>>500</option> 
  <option value="1000"<?php if($this->getCollection()->getPageSize()==1000): ?> selected="selected"<?php endif; ?>>1000</option> 
  <option value="2000"<?php if($this->getCollection()->getPageSize()==2000): ?> selected="selected"<?php endif; ?>>2000</option> 
</select>

Hope this helps?

Related Topic