Created
October 1, 2015 12:05
-
-
Save brankoajzele/174a0d8fcef62584a17e to your computer and use it in GitHub Desktop.
Magento - date as default sort order in Magento admin area
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function __construct() | |
{ | |
parent::__construct(); | |
$this->setDefaultSort('picking_date'); | |
$this->setDefaultDir('ASC'); | |
$today = new DateTime; | |
$this->setDefaultFilter(array( | |
'picking_date' => array( | |
'from' => $today->format('d/m/Y'), | |
'to' => $today->format('d/m/Y'), | |
'locale' => Mage::getStoreConfig('general/locale/code', Mage::app()->getStore()->getId()) | |
) | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment