OpenCart 🇺🇦

Схема

protected mixed validateDelete ( )

Аргументы

Аргумент Возможный тип Описание
У метода нет аргументов

Описание

Метод пока еще не документирован.

Исходный код

if (!$this->user->hasPermission('modify', 'localisation/geo_zone')) {
	$this->error['warning'] = $this->language->get('error_permission');
}

$this->load->model('localisation/tax_rate');

foreach ($this->request->post['selected'] as $geo_zone_id) {
	$tax_rate_total = $this->model_localisation_tax_rate->getTotalTaxRatesByGeoZoneId($geo_zone_id);

	if ($tax_rate_total) {
		$this->error['warning'] = sprintf($this->language->get('error_tax_rate'), $tax_rate_total);
	}
}

if (!$this->error) {
	return true;
} else {
	return false;
}