diff --git a/core/lib/Thelia/Controller/Admin/CustomerController.php b/core/lib/Thelia/Controller/Admin/CustomerController.php index 784790c2e..895490cb2 100644 --- a/core/lib/Thelia/Controller/Admin/CustomerController.php +++ b/core/lib/Thelia/Controller/Admin/CustomerController.php @@ -90,6 +90,7 @@ class CustomerController extends AbstractCrudController 'lastname' => $object->getLastname(), 'email' => $object->getEmail(), 'title' => $object->getTitleId(), + 'discount' => $object->getDiscount(), ); if ($address !== null) { diff --git a/core/lib/Thelia/Form/CustomerUpdateForm.php b/core/lib/Thelia/Form/CustomerUpdateForm.php index 61fb08ab4..14fb6fe68 100644 --- a/core/lib/Thelia/Form/CustomerUpdateForm.php +++ b/core/lib/Thelia/Form/CustomerUpdateForm.php @@ -158,6 +158,12 @@ class CustomerUpdateForm extends BaseForm "for" => "title" ) )) + ->add('discount', 'text', array( + 'label' => Translator::getInstance()->trans('permanent discount'), + 'label_attr' => array( + 'for' => 'discount' + ) + )) ; } diff --git a/core/lib/Thelia/Model/Customer.php b/core/lib/Thelia/Model/Customer.php index b3ee0085d..c44fc0e61 100644 --- a/core/lib/Thelia/Model/Customer.php +++ b/core/lib/Thelia/Model/Customer.php @@ -143,6 +143,15 @@ class Customer extends BaseCustomer implements UserInterface ->findOne(); } + public function setRef($v) + { + if (null !== $v) { + parent::setRef($v); + } + + return $this; + } + /** * create hash for plain password and set it in Customer object * diff --git a/templates/backOffice/default/customer-edit.html b/templates/backOffice/default/customer-edit.html index 53a3e6243..6c252390f 100644 --- a/templates/backOffice/default/customer-edit.html +++ b/templates/backOffice/default/customer-edit.html @@ -22,7 +22,7 @@