original_string: protected function cloneOrder()
      {
          $this->controlAccess('order_edit');
          $this->controlAccess('order_add');
  
          $update = array('status' => $this->order->getStatusCanceled());
  
          if ($this->createTempCartOrder() && $this->order->update($this->data_order['order_id'], $update)) {
              $this->logUpdateStatusOrder($update);
              $this->redirect("checkout/clone/{$this->data_order['order_id']}");
          }
  
          $this->redirect('', $this->text('Order has not been cloned'), 'warning');
      }
code: protected function cloneOrder()
      {
          $this->controlAccess('order_edit');
          $this->controlAccess('order_add');
  
          $update = array('status' => $this->order->getStatusCanceled());
  
          if ($this->createTempCartOrder() && $this->order->update($this->data_order['order_id'], $update)) {
              $this->logUpdateStatusOrder($update);
              $this->redirect("checkout/clone/{$this->data_order['order_id']}");
          }
  
          $this->redirect('', $this->text('Order has not been cloned'), 'warning');
      }
code_tokens: protected function cloneOrder ( ) { $ this -> controlAccess ( 'order_edit' ) ; $ this -> controlAccess ( 'order_add' ) ; $ update = array ( 'status' => $ this -> order -> getStatusCanceled ( ) ) ; if ( $ this -> createTempCartOrder ( ) && $ this -> order -> update ( $ this -> data_order [ 'order_id' ] , $ update ) ) { $ this -> logUpdateStatusOrder ( $ update ) ; $ this -> redirect ( "checkout/clone/{$this->data_order['order_id']}" ) ; } $ this -> redirect ( '' , $ this -> text ( 'Order has not been cloned' ) , 'warning' ) ; }
docstring: Copy an order
docstring_tokens: Copy an order