<?php
/******************************************************************
* PHPMass Shopping Cart
* The contents of this file are subject to the PHPMass License.
* If you do not agree with PHPMass License Terms and Conditions
* than you should not use this software.
* A copy of the license file is available on www.phpmass.com/license.htm page.
*
* PHPMass.com.
* All Rights Reserved.
******************************************************************/
$SiteSection = 'user';
require('../includes/config.php');
// Cart and top products
$LastProducts = $Carts->getLastProducts();
if (is_array($LastProducts)) {
$LastProduct = array_shift($LastProducts);
}
$smarty->assign('LastProduct', $LastProduct);
$smarty->assign('LastProducts', $LastProducts);
$TopProducts = $Categories->getTopProducts(0,false,true);
$smarty->assign('TopProducts', $TopProducts);
// END Cart and top products
if ($logedin != 1) {
header('Location: /index.php');
exit();
}
$ExistingDiscounts = $Discounts->getUserDiscounts($userid,true);
if (count($ExistingDiscounts) == 0) $InfoMessage['No_Vouchers_Found'] = $Lang['No_Vouchers_Found'];
$InfoMessage['Adding_Vouchers_Info'] = $Lang['Adding_Vouchers_Info'];
$smarty->assign('ExistingDiscounts', $ExistingDiscounts);
$smarty->assign('PageTitle', $Lang['Vouchers']);
$smarty->assign('Error', $Error);
$smarty->assign('InfoMessage', $InfoMessage);
$smarty->display(DOC_ROOT.'/skin/templates/user/'.'vouchers.tpl');
?>