shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

success.php (2515B)


      1 <?php
      2 class ControllerCheckoutSuccess extends Controller {
      3 	public function index() {
      4 		$this->load->language('checkout/success');
      5 
      6 		if (isset($this->session->data['order_id'])) {
      7 			$data['transaction_id'] = $this->session->data['order_id'];
      8 			$data['cart_total'] = $this->cart->getTotal();
      9 			$this->cart->clear();
     10 
     11 			unset($this->session->data['shipping_method']);
     12 			unset($this->session->data['shipping_methods']);
     13 			unset($this->session->data['payment_method']);
     14 			unset($this->session->data['payment_methods']);
     15 			unset($this->session->data['guest']);
     16 			unset($this->session->data['comment']);
     17 			unset($this->session->data['order_id']);
     18 			unset($this->session->data['coupon']);
     19 			unset($this->session->data['reward']);
     20 			unset($this->session->data['voucher']);
     21 			unset($this->session->data['vouchers']);
     22 			unset($this->session->data['totals']);
     23 		}
     24 
     25 		$this->document->setTitle($this->language->get('heading_title'));
     26 
     27 		$data['breadcrumbs'] = array();
     28 
     29 		$data['breadcrumbs'][] = array(
     30 			'text' => $this->language->get('text_home'),
     31 			'href' => $this->url->link('common/home')
     32 		);
     33 
     34 		$data['breadcrumbs'][] = array(
     35 			'text' => $this->language->get('text_basket'),
     36 			'href' => $this->url->link('checkout/cart')
     37 		);
     38 
     39 		$data['breadcrumbs'][] = array(
     40 			'text' => $this->language->get('text_checkout'),
     41 			'href' => $this->url->link('checkout/checkout', '', true)
     42 		);
     43 
     44 		$data['breadcrumbs'][] = array(
     45 			'text' => $this->language->get('text_success'),
     46 			'href' => $this->url->link('checkout/success')
     47 		);
     48 
     49 		if ($this->customer->isLogged()) {
     50 			$data['text_message'] = sprintf($this->language->get('text_customer'), $this->url->link('account/account', '', true), $this->url->link('account/order', '', true), $this->url->link('account/download', '', true), $this->url->link('information/contact'));
     51 		} else {
     52 			$data['text_message'] = sprintf($this->language->get('text_guest'), $this->url->link('information/contact'));
     53 		}
     54 
     55 		$data['continue'] = $this->url->link('common/home');
     56 
     57 		$data['column_left'] = $this->load->controller('common/column_left');
     58 		$data['column_right'] = $this->load->controller('common/column_right');
     59 		$data['content_top'] = $this->load->controller('common/content_top');
     60 		$data['content_bottom'] = $this->load->controller('common/content_bottom');
     61 		$data['footer'] = $this->load->controller('common/footer');
     62 		$data['header'] = $this->load->controller('common/header');
     63 
     64 		$this->response->setOutput($this->load->view('common/success', $data));
     65 	}
     66 }