<?php
session_start();
/*
asaancart - easy shopping cart solution
---------------------------------------
Copyright 2009 Nasir Ahmad Khan
Email: hide@address.com
This file is part of asaancart - open source easy shopping cart solution.
asaancart is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
asaancart is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with asaancart. If not, see <http://www.gnu.org/licenses/>.
*/
include("../config/config.php");
include("classes/functions.php");
if (session_id() == "") session_start();
$session_id = session_id();
include("includes/global_settings.php");
if($_GET['error_msg']!=""){
$smarty->assign('error_msg', $_GET['error_msg']);
$smarty->assign('customer_name', $_SESSION['customer_name']);
$smarty->assign('business_name', $_SESSION['business_name']);
$smarty->assign('email_address', $_SESSION['email_address']);
$smarty->assign('mobile', $_SESSION['mobile']);
$smarty->assign('phone', $_SESSION['phone']);
$smarty->assign('state', $_SESSION['state']);
$smarty->assign('city', $_SESSION['city']);
$smarty->assign('suburb', $_SESSION['suburb']);
$smarty->assign('postcode', $_SESSION['postcode']);
$smarty->assign('address', $_SESSION['address']);
$smarty->assign('shipping_country', $_SESSION['shipping_country']);
$smarty->assign('shipping_state', $_SESSION['shipping_state']);
$smarty->assign('suburb', $_SESSION['suburb']);
$smarty->assign('postcode', $_SESSION['postcode']);
$smarty->assign('address', $_SESSION['address']);
$smarty->assign('shipping_country', $_SESSION['shipping_country']);
$smarty->assign('shipping_state', $_SESSION['shipping_state']);
$smarty->assign('shipping_city', $_SESSION['shipping_city']);
$smarty->assign('shipping_postcode', $_SESSION['shipping_postcode']);
$smarty->assign('shipping_suburb', $_SESSION['shipping_suburb']);
$smarty->assign('shipping_address', $_SESSION['shipping_address']);
$smarty->assign('shipping_instructions', $_SESSION['shipping_instructions']);
}
$smarty->assign('login_msg', 'If you are already registered with us please enter your email address and password');
$smarty->assign('site_url', SITE_URL);
$smarty->assign('shippingTotal',shippingRate(getCartTotalAmount($session_id)));
$cartTotal = getCartTotalAmount($session_id)+ shippingRate(getCartTotalAmount($session_id));
//end shipping cost
$smarty->assign('cartTotal',$cartTotal);
$smarty->assign('cartItems',getCartItems($session_id));
$smarty->assign('cartSubTotal', getCartTotalAmount($session_id));
//express checkout
$smarty->assign('paymentType','sale');
$smarty->assign('currencyCodeType',getStoreBasicInfoByOneParam('currency'));
$smarty->assign('payment_options_available', getDefaultPaymentOptions());
$smarty->assign('template','checkout');
$smarty->display('shop/site_index.tpl');
?>