<?php

require_once 'modules/admin/views/public/SignupView.php';

/**
* @package Admin
*/
class ViewSignup_5_Complete extends SignupView
{
    var $permission     = '';

    function dispatch()
    {

        $this->initialize();

        // Init some vars
        $this->templateInit();

        // Set header info
        $this->headerlabel = $this->lang("Order - Step 5 - Order Complete");

        // Process the progress bar
        $this->tplView->progress = $this->getProgressBar(5);
        $this->tplView->progressBar = $this->tplView->fetch('progressBar.tpl.php');

        // This information can be required for affiliates URL
        $invoice_information = unserialize(base64_decode(@$_SESSION['invoice_information']));
        if(is_array($invoice_information)
          && isset($invoice_information['invoice_id'])
          && isset($invoice_information['invoice_amount_no_tax'])
          && isset($invoice_information['invoice_amount'])){
            $this->tplView->invoice_id            = $invoice_information['invoice_id'];
            $this->tplView->invoice_amount_no_tax = $invoice_information['invoice_amount_no_tax'];
            $this->tplView->invoice_amount        = $invoice_information['invoice_amount'];
        }else{
            $this->tplView->invoice_id            = 0;
            $this->tplView->invoice_amount_no_tax = 0;
            $this->tplView->invoice_amount        = 0;
        }

        // Now we are here, destroy the cart session
        $this->destroyCart();

        // Destroy also the currency
        $this->destroyCurrency();

        // Destroy also the invoice information
        $this->destroyInvoiceInformation();

        // Output the template
        $this->tplView->display('signup_5_Complete.tpl.php');

        // Show the footer
        $this->tplView->display('signup_footer.tpl.php');


    }
}

?>
