So far I've been able to do it in account/register by copying the parts related to the password confirmation and modifying them to match the email field (I've put the code below). It works.
However, I can't get it to work in checkout/register: things seem to work differently there, there aren't the same parts of code as in account/register and if I copy and edit the only piece of code related to password confirmation, it doesn't work.
Also I don't know how to do it in checkout/guest, account/edit and account/voucher because there is no "Password" field there, so there is nothing to copy and edit.
Is there anyone who can help me?
Here's the code I used for account/register:
In template/account/register.twig I added:
Code: Select all
<div class="form-group required">
<label class="col-sm-3 control-label" for="input-email-confirm">{{ entry_email_confirm }}</label>
<div class="col-sm-9">
<input type="email" name="emailconfirm" value="{{ emailconfirm }}" placeholder="{{ entry_email_confirm }}" id="input-email-confirm" class="form-control" />
{% if error_email_confirm %}
<div class="text-danger">{{ error_email_confirm }}</div>
{% endif %} </div>
</div>
Code: Select all
if (isset($this->error['emailconfirm'])) {
$data['error_email_confirm'] = $this->error['emailconfirm'];
} else {
$data['error_email_confirm'] = '';
}
Code: Select all
if (isset($this->request->post['emailconfirm'])) {
$data['emailconfirm'] = $this->request->post['emailconfirm'];
} else {
$data['emailconfirm'] = '';
}
Code: Select all
if ($this->request->post['emailconfirm'] != $this->request->post['email']) {
$this->error['emailconfirm'] = $this->language->get('error_email_confirm');
}
Code: Select all
$_['entry_email_confirm'] = 'Confirm E-Mail';
$_['error_email_confirm'] = 'Confirm E-Mail does not match E-Mail!';