Example #1
0
 public function setDeliveryTypeAction()
 {
     header('Content-type: text/plain; charset=utf-8');
     header('Cache-Control: no-store, no-cache');
     header('Expires: ' . date('r'));
     $orderId = Validate::validateInputVar('orderId', 'INPUT_GET', 'int');
     $typeId = Validate::validateInputVar('typeId', 'INPUT_GET', 'int');
     if (!$orderId || !$typeId) {
         throw new Exception('Неверный id для смены типа доставки');
     }
     $model = new OrderTableModel();
     echo $model->setDeliveryType($orderId, $typeId);
 }