Схема
public mixed
removeCommission (
)
Аргументы
| Аргумент |
Возможный тип |
Описание |
|
У метода нет аргументов
|
Описание
Метод пока еще не документирован.
Исходный код
$this->language->load('sale/order');
$json = array();
if (!$this->user->hasPermission('modify', 'sale/order')) {
$json['error'] = $this->language->get('error_permission');
} elseif (isset($this->request->get['order_id'])) {
$this->load->model('sale/order');
$order_info = $this->model_sale_order->getOrder($this->request->get['order_id']);
if ($order_info && $order_info['affiliate_id']) {
$this->load->model('sale/affiliate');
$this->model_sale_affiliate->deleteTransaction($this->request->get['order_id']);
$json['success'] = $this->language->get('text_commission_removed');
} else {
$json['error'] = $this->language->get('error_action');
}
}
$this->response->setOutput(json_encode($json));