I want to add a two year interval filter to customer order by report grid ,but I have no idea about this.Anyone who have tried it please find me a way ,thanks in advance.
I found to add code here in this path
app\code\core\Mage\Reports\Model\Resource\Report\Collection.php
and code for a year interval is
$t['title'] = $dateStart->toString('yyyy');
$t['start'] = ($firstInterval) ? $dateStart->toString('yyyy-MM-dd 00:00:00')
: $dateStart->toString('yyyy-01-01 00:00:00');
$lastInterval = ($dateStart->compareYear($dateEnd->getYear()) == 0);
$t['end'] = ($lastInterval) ? $dateStart->setMonth($dateEnd->getMonth())
->setDay($dateEnd->getDay())->toString('yyyy-MM-dd 23:59:59')
: $dateStart->toString('yyyy-12-31 23:59:59');
$dateStart->addYear(1);
if ($dateStart->compareYear($dateEnd->getYear()) == 0) {
$dateStart->setMonth(1)->setDay(1);
$firstInterval = false;
break;
}
How can i modify this for two year interval period.