Jump to content

How to change date format in Admin panel viewing order or custumer listing


Recommended Posts

Sometimes date are handy coded

in Admin Panel ... Backoffice

the two listings of Orders and Customer are in YYYY mm dd - date format
independent from tha language you choose ...

change AdminOrders.php and AdminCustomers.php

l. 43 - 'date_add' => array('title' => $this->l('Date'), 'width' => 90, 'align' => 'right', 'type' => 'date', 'date' => true, 'filter_key' => 'a!date_add'),

+

l. 34 - 'birthday' => array('title' => $this->l('Birthday'), 'width' => 60, 'type' => 'date', 'birthday' => true),
l. 38 - 'date_add' => array('title' => $this->l('Registration Date'), 'width' => 60, 'type' => 'date', 'date' => true));

AND FINALLY AdminTab.php after elseif from price ... aprox ... l. 1120

elseif (isset($params['price']))
echo Tools::displayPrice($tr[$key], (isset($params['currency']) ? new Currency(intval($tr['id_currency'])) : $currency), false, false);

//NEW PART
elseif (isset($params['date']))
echo Tools::displayDate($tr[$key], $cookie->id_lang, true, '-');
elseif (isset($params['birthday']))
echo Tools::displayDate($tr[$key], $cookie->id_lang, false, '-');

...

ATENTION: true - full date with hours. false - no hours, '-' - separator


NOW I'M SEARCHING A WAY SO THE FILTERS WORKING PROPERLY WITH NEW DATE FORMAT

Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...