Post by Vindojeens » Thu Feb 16, 2017 9:05 pm

Hey,
the situation is the following:

We use guest checkout without registration and the most important value for us is the phone number of the customer (so we can callback).
The problem is, people sometimes make typos and we cannot fullfil the order.

What I would like to do is add a second phone number field below the first one and make people enter their number twice, then make the fields check for similar input. Like password fields on some websites.

Someone can help me with it?

Help is much apreciated!! :)

Newbie

Posts

Joined
Sun Nov 20, 2016 12:49 am

Post by JDECLEMENTI » Sat Feb 18, 2017 4:18 am

What opencart version?? I might be able to throw a quick mod together for you. seems simple enough

Newbie

Posts

Joined
Fri Jan 20, 2017 11:51 pm

Post by JDECLEMENTI » Sat Feb 18, 2017 4:45 am

you could just code it yourself and edit the template files

add this after the phone input

Code: Select all

<div class="form-group required  col-md-6">
                  <label class="control-label" for="input-payment-telephone-verify">Telephone Verification</label>
                  <input type="text" required="required" id="input-payment-telephone-verify" oninput="check(this)" class="form-control">
                  <script language="javascript" type="text/javascript">
    function check(input) {
        if (input.value != document.getElementById('input-payment-telephone').value) {
            input.setCustomValidity('Telephone Must be Matching.');
        } else {
            // input is valid -- reset the error message
            input.setCustomValidity('');
        }
    }
</script>
                </div>

Newbie

Posts

Joined
Fri Jan 20, 2017 11:51 pm

Post by Vindojeens » Sun Feb 26, 2017 5:43 pm

Thanks you 2. I'm using 2.3.0.2

Newbie

Posts

Joined
Sun Nov 20, 2016 12:49 am
Who is online

Users browsing this forum: No registered users and 11 guests