Jump to content

Edit History

Rizzzle

Rizzzle

Thanks Knowband. It worked in 1.8.

Is there any way to have an acknowledgment message to let the customer know the form was recieved?

Rizzzle

Rizzzle

Knowband, please can you update the code for 1.8? Will buy you a coffee or two.

Below is the code for 1.8:

public function submit()
    {
        if ($this->validate()) {
            $clearTextPassword = $this->getValue('password');
            $newPassword = $this->getValue('new_password');

            $ok = $this->customerPersister->save(
                $this->getCustomer(),
                $clearTextPassword,
                $newPassword,
                $this->passwordRequired
            );


            if (!$ok) {
                foreach ($this->customerPersister->getErrors() as $field => $errors) {
                    $this->formFields[$field]->setErrors($errors);
                }
            }

            return $ok;
        }

        return false;
    }

×
×
  • Create New...