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
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I'so sorry ! My version is 3.0.3.2. they are not displayed by default in the client's office.here is my code for output custom fields:
in common/accoun/account.php
Code: Select all
// Custom Fields
$data['custom_fields'] = array();
$this->load->model('account/custom_field');
$custom_fields = $this->model_account_custom_field->getCustomFields(1);
foreach ($custom_fields as $custom_field) {
if ($custom_field['location'] == 'account') {
$data['custom_fields'][] = $custom_field;
}
}
if (isset($this->request->post['custom_field']['account'])) {
$data['register_custom_field'] = $this->request->post['custom_field']['account'];
} else {
$data['register_custom_field'] = array();
}
Code: Select all
{% if custom_fields %}
<fieldset>
{% for custom_field in custom_fields %}
{% if custom_field.location == 'account' %}
{% if custom_field.type == 'select' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<select name="custom_field[{{ custom_field.custom_field_id }}]" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">
<option value="">{{ text_select }}</option>
{% for custom_field_value in custom_field.custom_field_value %}
{% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == account_custom_field[custom_field.custom_field_id] %}
<option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
{% else %}
<option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
{% endif %}
{% endfor %}
</select>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'radio' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="radio"> {% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == account_custom_field[custom_field.custom_field_id] %}
<label>
<input type="radio" name="custom_field[{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="radio" name="custom_field[{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %}</div>
{% endfor %} </div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'checkbox' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div> {% for custom_field_value in custom_field.custom_field_value %}
<div class="checkbox">{% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in account_custom_field[custom_field.custom_field_id] %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
{{ custom_field_value.name }}</label>
{% else %}
<label>
<input type="checkbox" name="custom_field[{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
{{ custom_field_value.name }}</label>
{% endif %}</div>
{% endfor %}</div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'text' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<input type="text" name="custom_field[{{ custom_field.custom_field_id }}]"
value="{{ account_custom_field[custom_field.custom_field_id] ? account_custom_field[custom_field.custom_field_id] : custom_field.value }}"
placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'textarea' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<textarea name="custom_field[{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">{{ account_custom_field[custom_field.custom_field_id] ? account_custom_field[custom_field.custom_field_id] : custom_field.value }}</textarea>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'file' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label">{{ custom_field.name }}</label>
<div class="col-sm-10">
<button type="button" id="button-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
<input type="hidden" name="custom_field[{{ custom_field.custom_field_id }}]" value="{{ account_custom_field[custom_field.custom_field_id] ? account_custom_field[custom_field.custom_field_id] }}" id="input-custom-field{{ custom_field.custom_field_id }}" />
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'date' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group date">
<input type="text" name="custom_field[{{ custom_field.custom_field_id }}]" value="{{ account_custom_field[custom_field.custom_field_id] ? account_custom_field[custom_field.custom_field_id] : custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'time' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group time">
<input type="text" name="custom_field[{{ custom_field.custom_field_id }}]" value="{{ account_custom_field[custom_field.custom_field_id] ? account_custom_field[custom_field.custom_field_id] : custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% if custom_field.type == 'datetime' %}
<div class="form-group custom-field custom-field{{ custom_field.custom_field_id }}" data-sort="{{ custom_field.sort_order }}">
<label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
<div class="col-sm-10">
<div class="input-group datetime">
<input type="text" name="custom_field[{{ custom_field.custom_field_id }}]" value="{{ account_custom_field[custom_field.custom_field_id] ? account_custom_field[custom_field.custom_field_id] : custom_field.value }}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
{% if error_custom_field[custom_field.custom_field_id] %}
<div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
{% endif %}</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
{% endif %}
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
that is the case that they were created. and they are in the database. in the admin section in the Clients section. when I see customer information, the fields are displayed and relevant.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The person asks how to display and why the customized fields are not displayed for the user on the account, and you send it to a third topic. Why are you always rude and always pretending to be smart?straightlight wrote: ↑Mon Jan 27, 2020 2:55 amThis type of issue has been reported on Github Opencart already. See this discussion: https://github.com/opencart/opencart/issues/7533 .
4 years later to post about an old reply that's been solved a long time ago instead of creating a new topic.rale wrote: ↑Sat Feb 03, 2024 4:29 amThe person asks how to display and why the customized fields are not displayed for the user on the account, and you send it to a third topic. Why are you always rude and always pretending to be smart?straightlight wrote: ↑Mon Jan 27, 2020 2:55 amThis type of issue has been reported on Github Opencart already. See this discussion: https://github.com/opencart/opencart/issues/7533 .
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
But no one answered the question for 4 years. As for you, I have noticed on numerous topics on the forum that when people ask for something, you write codes for something completely different or simply ignore them with some information about the rules. I'm sorry, but I think that the basic things that other programmers charge a lot of money for are being overlooked. And there is no answer on the forum for this question yet and we all follow your post and remain confused. In any case, thanks for the answer.straightlight wrote: ↑Sat Feb 03, 2024 5:54 am4 years later to post about an old reply that's been solved a long time ago instead of creating a new topic.rale wrote: ↑Sat Feb 03, 2024 4:29 amThe person asks how to display and why the customized fields are not displayed for the user on the account, and you send it to a third topic. Why are you always rude and always pretending to be smart?straightlight wrote: ↑Mon Jan 27, 2020 2:55 amThis type of issue has been reported on Github Opencart already. See this discussion: https://github.com/opencart/opencart/issues/7533 .
Off-topic. It hasn't been answered for 4 years, then why would anyone want to catch up what's been left off 4 years ago while new topics could rather be created. As for the confusion, it's simply related from the people that are able to read between the lines.rale wrote: ↑Sat Feb 10, 2024 2:34 amBut no one answered the question for 4 years. As for you, I have noticed on numerous topics on the forum that when people ask for something, you write codes for something completely different or simply ignore them with some information about the rules. I'm sorry, but I think that the basic things that other programmers charge a lot of money for are being overlooked. And there is no answer on the forum for this question yet and we all follow your post and remain confused. In any case, thanks for the answer.straightlight wrote: ↑Sat Feb 03, 2024 5:54 am4 years later to post about an old reply that's been solved a long time ago instead of creating a new topic.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Ok, lets we ON-topic again.straightlight wrote: ↑Mon Feb 12, 2024 3:50 amOff-topic. It hasn't been answered for 4 years, then why would anyone want to catch up what's been left off 4 years ago while new topics could rather be created. As for the confusion, it's simply related from the people that are able to read between the lines.rale wrote: ↑Sat Feb 10, 2024 2:34 amBut no one answered the question for 4 years. As for you, I have noticed on numerous topics on the forum that when people ask for something, you write codes for something completely different or simply ignore them with some information about the rules. I'm sorry, but I think that the basic things that other programmers charge a lot of money for are being overlooked. And there is no answer on the forum for this question yet and we all follow your post and remain confused. In any case, thanks for the answer.straightlight wrote: ↑Sat Feb 03, 2024 5:54 am
4 years later to post about an old reply that's been solved a long time ago instead of creating a new topic.
Why is problem to provide some codes for show customer basic info from main account in account page? OC need to have after 10 year basic info customer when customer go to own main account.
How we can show first name, last name , company name, customer id, email, telephone , address and group on main customer account page and why not?
Users browsing this forum: No registered users and 5 guests