original_string: public function deleteFromProductCompare($compare_action_model)
      {
          $product_id = $this->getSubmitted('product_id');
          $result = $compare_action_model->delete($product_id);
  
          if ($this->isAjax()) {
              $this->outputJson($result);
          }
  
          $this->controlDeleteProductCompare($result, $product_id);
          $this->redirect($result['redirect'], $result['message'], $result['severity']);
      }
code: public function deleteFromProductCompare($compare_action_model)
      {
          $product_id = $this->getSubmitted('product_id');
          $result = $compare_action_model->delete($product_id);
  
          if ($this->isAjax()) {
              $this->outputJson($result);
          }
  
          $this->controlDeleteProductCompare($result, $product_id);
          $this->redirect($result['redirect'], $result['message'], $result['severity']);
      }
code_tokens: public function deleteFromProductCompare ( $ compare_action_model ) { $ product_id = $ this -> getSubmitted ( 'product_id' ) ; $ result = $ compare_action_model -> delete ( $ product_id ) ; if ( $ this -> isAjax ( ) ) { $ this -> outputJson ( $ result ) ; } $ this -> controlDeleteProductCompare ( $ result , $ product_id ) ; $ this -> redirect ( $ result [ 'redirect' ] , $ result [ 'message' ] , $ result [ 'severity' ] ) ; }
docstring: Deletes a submitted product from comparison
  @param \gplcart\core\models\ProductCompareAction $compare_action_model
docstring_tokens: Deletes a submitted product from comparison