OpenCart 🇺🇦

Схема

protected mixed validateDelete ( )

Аргументы

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

Описание

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

Исходный код

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

$this->load->model('setting/store');

foreach ($this->request->post['selected'] as $information_id) {
	if ($this->config->get('config_account_id') == $information_id) {
		$this->error['warning'] = $this->language->get('error_account');
	}

	if ($this->config->get('config_checkout_id') == $information_id) {
		$this->error['warning'] = $this->language->get('error_checkout');
	}

	if ($this->config->get('config_affiliate_id') == $information_id) {
		$this->error['warning'] = $this->language->get('error_affiliate');
	}

	$store_total = $this->model_setting_store->getTotalStoresByInformationId($information_id);

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

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