<?php
class ControllerPaymentOrcamento extends Controller {
  
  protected function index(){
		$this->data['continue'] = $this->url->link('checkout/success');
		$this->data['back'] = $this->url->link('checkout/checkout', '', 'SSL');
		$this->data['text_payment'] = $this->config->get('orcamento_instrucoes');
		
 		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/orcamento.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/payment/orcamento.tpl';
		} else {
			$this->template = 'default/template/payment/orcamento.tpl';
		}

		$this->render(); 
  }
  
  
  public function confirm() {
    $this->load->model('checkout/order');
    $this->model_checkout_order->confirm($this->session->data['order_id'], $this->config->get('orcamento_status_iniciado'), '', true);
	
	if (isset($this->session->data['order_id'])) {
		$this->cart->clear();
		
		unset($this->session->data['shipping_method']);
		unset($this->session->data['shipping_methods']);
		unset($this->session->data['payment_method']);
		unset($this->session->data['payment_methods']);
		unset($this->session->data['guest']);
		unset($this->session->data['comment']);
		unset($this->session->data['order_id']);	
		unset($this->session->data['coupon']);
		unset($this->session->data['reward']);
		unset($this->session->data['voucher']);
		unset($this->session->data['vouchers']);
	}	
  }



}
?>