Answer the question
In order to leave comments, you need to log in
How to upload pictures in Opencart 3?
Good day!
The task on the main page is to display blocks with pictures and text information /
I'm trying to write my own module for displaying information.
with the recording of textual information, everything is clear in the controller
if (isset($this->request->post['field'])) {
$data['field'] = $this->request->post['field'];
} elseif (!empty($module_info)) {
$data['field'] = $module_info['field'];
} else {
$data['field'] = '';
}
ну и в валидацию прописываем проверку
<div class="form-group">
<label class="col-sm-2 control-label" for="input-field">{{ entry_field }}</label>
<div class="col-sm-10">
<input type="text" name="field" value="{{ field }}" placeholder="{{ entry_field }}" id="input-field" class="form-control" />
{% if error_field %}
<div class="text-danger">{{ error_field }}</div>
{% endif %}
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question