Схема
protected mixed
validateDelete (
)
Аргументы
| Аргумент |
Возможный тип |
Описание |
|
У метода нет аргументов
|
Описание
Метод пока еще не документирован.
Исходный код
if (!$this->user->hasPermission('modify', 'localisation/weight_class')) {
$this->error['warning'] = $this->language->get('error_permission');
}
$this->load->model('catalog/product');
foreach ($this->request->post['selected'] as $weight_class_id) {
if ($this->config->get('config_weight_class_id') == $weight_class_id) {
$this->error['warning'] = $this->language->get('error_default');
}
$product_total = $this->model_catalog_product->getTotalProductsByWeightClassId($weight_class_id);
if ($product_total) {
$this->error['warning'] = sprintf($this->language->get('error_product'), $product_total);
}
}
if (!$this->error) {
return true;
} else {
return false;
}