diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php index b7078a0f1..e4eaac7de 100644 --- a/controllers/admin/AdminCustomersController.php +++ b/controllers/admin/AdminCustomersController.php @@ -966,6 +966,21 @@ class AdminCustomersControllerCore extends AdminController return parent::processSave(); } + protected function copyFromPost(&$object, $table) + { + parent::copyFromPost($object, $table); + + $years = Tools::getValue('years'); + $months = Tools::getValue('months'); + $days = Tools::getValue('days'); + + if ($years != '' && $months != '' && $days != '') { + $object->birthday = (int) $years.'-'.(int) $months.'-'.(int) $days; + } elseif ($years == '' && $months == '' && $days == '') { + $object->birthday = null; + } + } + protected function afterDelete($object, $old_id) { $customer = new Customer($old_id);