Вопрос о php изменить вывод стандартного поля
В опенкарте стоял:
if (!empty($firstname['required'])) {
if ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen($this->request->post['firstname']) > 32)) {
$json['error']['firstname'] = $this->language->get('error_firstname');
}
}
Показывало сообщение, заменил на:
if (!empty($firstname['required'])) {
if ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen($this->request->post['firstname']) > 32)) {
$json['error']['firstname'] = $this->language->get('error_firstname');
// добавляем CSS класс 'error' к полю 'firstname'
$this->document->addStyle('.input-text[name="firstname"] { border: 1px solid red; }');
}
}
Кто подскажет, что делать, чтобы сработало? Помогите, пожалуйста.