Здравствуйте! Подскажите пожалуйста, как сделать поле Партнер обязательным в редактировании заказа в админке.
Opencart 3
В файле admin\view\template\sale\order_form.twig
я нашел аджакс скрипт который Наверное отвечает за обработку этого поля, но как добавить обязательность, я примеров не нашел...
Вот этот скрипт
// Affiliate
$('input[name=\'affiliate\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=customer/customer/autocomplete&user_token={{ user_token }}&filter_affiliate=1&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
json.unshift({
customer_id: 0,
name: '{{ text_none }}'
});
response($.map(json, function(item) {
return {
label: item['name'],
value: item['customer_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'affiliate\']').val(item['label']);
$('input[name=\'affiliate_id\']').val(item['value']);
}
});