<?php

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


/**
* @package Admin
*/
class ViewSignup_4_TaxInfo extends SignupView
{
    var $permission     = '';
    var $showHeader = false;

    function dispatch()
    {

        $this->initialize();
        $this->currencys = new Currency($this->user);
        
        $cartSummary = $this->getCartSummary();
        
        if ($this->user->getEmail() != '' && !$this->user->isAdmin()) {
            $countryCode = $this->user->getCountry();
            $stateCode = $this->user->getState();
            $vatNumber = $this->user->getVatNumber();
            $userID = $this->user->getId();
        } else {
            $this->tplView->loggedIn = false;
            $countryCode = @$_REQUEST['country'];
            $stateCode = @$_REQUEST['state'];
            $vatNumber = @$_REQUEST['vatNumber'];
            $userID = false;
        }
        
        // Sort out the tax
        $this->tplView->tax = $this->processCartTax($cartSummary, $countryCode, $stateCode, $vatNumber, $userID);

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

?>
