K
K
kk952019-11-11 14:26:34
JavaScript
kk95, 2019-11-11 14:26:34

How to change the order form in Opencart 2.3 (phone number input field)?

Hello! By default, in Opencart , the form for entering a phone number, when you click on the field, displays this window
5dc94002b3490241423366.jpeg
, and then if you click on this window that has fallen out, we get this:
5dc940a382c74800508299.png
I tried to remove the name="telefone" attribute, and in the checkout.php file I assigned entry_telephone (the one that goes to the attribute of the tag) - instead of the word "Phone" the characters are: '+7 (___) ___-__-__' that is got this code:placeholder="<?php echo $entry_telephone; ?>"

<input type="text" value="<?php echo $telephone; ?>" placeholder="<?php echo $entry_telephone; ?>" id="input-payment-telephone" class="form-control" />

where
$_['entry_telephone']                = '+7 (___) ___-__-__';

But at the same time, the site began to swear at the json error in the phone field.
As I understand it, this is due to the fact that I removed the name attribute. because when I returned it, the error disappeared. The problem is that this attribute again gives an unnecessary blank.
5dc944d3f2e0e085335279.png
Please tell me what to do so that there is either a blank with +7 in the drop-down window, or that this drop-down window does not exist, but at the same time name = "telefone" remains with<input>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question