Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk
Version 3.0.3.8, I found a solution In the account twig file I put that part of the code as a comment and that is a hide phone number and in the same way, i did with the newsletter. But now there is another problem I can't find a twig file where if I want as a user to change my information
Attachments
inf - Screenshot_39.jpg (35.3 KiB) Viewed 888 times
catalog/view/theme/default/template/account/register.twig
Remove
Code: Select all
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>
<div class="col-sm-10">
<input type="tel" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
{% if error_telephone %}
<div class="text-danger">{{ error_telephone }}</div>
{% endif %} </div>
</div>
remove
Code: Select all
<fieldset>
<legend>{{ text_newsletter }}</legend>
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_newsletter }}</label>
<div class="col-sm-10"> {% if newsletter %}
<label class="radio-inline">
<input type="radio" name="newsletter" value="1" checked="checked" />
{{ text_yes }}</label>
<label class="radio-inline">
<input type="radio" name="newsletter" value="0" />
{{ text_no }}</label>
{% else %}
<label class="radio-inline">
<input type="radio" name="newsletter" value="1" />
{{ text_yes }}</label>
<label class="radio-inline">
<input type="radio" name="newsletter" value="0" checked="checked" />
{{ text_no }}</label>
{% endif %} </div>
</div>
</fieldset>
remove
Code: Select all
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>
<div class="col-sm-10">
<input type="tel" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
{% if error_telephone %}
<div class="text-danger">{{ error_telephone }}</div>
{% endif %}
</div>
</div>
remove
Code: Select all
<div class="form-group required">
<label class="control-label" for="input-payment-telephone">{{ entry_telephone }}</label>
<input type="text" name="telephone" value="" placeholder="{{ entry_telephone }}" id="input-payment-telephone" class="form-control" />
</div>
edit
catalog/controller/account/register.php
catalog/controller/account/edit.php
catalog/controller/checkout/register.php
remove
Code: Select all
if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) {
$this->error['telephone'] = $this->language->get('error_telephone');
}
How did you look because I found these 2 answers in 10 seconds on Google?aleksandarpejas wrote: ↑Fri Dec 03, 2021 5:41 amHello, I've looked around the forum but can't find an answer. Does anybody know how I can remove the telephone field on the registration form?
viewtopic.php?t=188438
viewtopic.php?t=204732
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
That's because he hasn't. It all depends on the keywords being used on those search engines.paulfeakins wrote: ↑Fri Dec 03, 2021 7:56 pmHow did you look because I found these 2 answers in 10 seconds on Google?aleksandarpejas wrote: ↑Fri Dec 03, 2021 5:41 amHello, I've looked around the forum but can't find an answer. Does anybody know how I can remove the telephone field on the registration form?
viewtopic.php?t=188438
viewtopic.php?t=204732
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
moshair wrote: ↑Fri Dec 03, 2021 6:50 pmTelephone is a required value in oc, you can't just comment or remove the input fields in templates.
catalog/view/theme/default/template/account/register.twig
Removeand for the newsletter:Code: Select all
<div class="form-group required"> <label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label> <div class="col-sm-10"> <input type="tel" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" /> {% if error_telephone %} <div class="text-danger">{{ error_telephone }}</div> {% endif %} </div> </div>
removecatalog/view/theme/default/template/account/edit.twigCode: Select all
<fieldset> <legend>{{ text_newsletter }}</legend> <div class="form-group"> <label class="col-sm-2 control-label">{{ entry_newsletter }}</label> <div class="col-sm-10"> {% if newsletter %} <label class="radio-inline"> <input type="radio" name="newsletter" value="1" checked="checked" /> {{ text_yes }}</label> <label class="radio-inline"> <input type="radio" name="newsletter" value="0" /> {{ text_no }}</label> {% else %} <label class="radio-inline"> <input type="radio" name="newsletter" value="1" /> {{ text_yes }}</label> <label class="radio-inline"> <input type="radio" name="newsletter" value="0" checked="checked" /> {{ text_no }}</label> {% endif %} </div> </div> </fieldset>
removecatalog/view/theme/default/template/checkout/register.twigCode: Select all
<div class="form-group required"> <label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label> <div class="col-sm-10"> <input type="tel" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" /> {% if error_telephone %} <div class="text-danger">{{ error_telephone }}</div> {% endif %} </div> </div>
removeedit controllers to remove telephone check:Code: Select all
<div class="form-group required"> <label class="control-label" for="input-payment-telephone">{{ entry_telephone }}</label> <input type="text" name="telephone" value="" placeholder="{{ entry_telephone }}" id="input-payment-telephone" class="form-control" /> </div>
edit
catalog/controller/account/register.php
catalog/controller/account/edit.php
catalog/controller/checkout/register.php
removeCode: Select all
if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) { $this->error['telephone'] = $this->language->get('error_telephone'); }
Thank you soo much for the help, and sorry about late answer, problem with time zone
Users browsing this forum: No registered users and 279 guests