Location: PHPKode > scripts > PHPMass Shopping Cart > phpmass-shopping-cart/user/newsletter.php
<?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 (isset($_POST['updateNewsletter'])) {
	$Users->updateNewsletter($userid,$_POST['generalNewsletter'],$_POST['weeklyNewsletter'],$_POST['mounthlyNewsletter'],$_POST['dailyNewsletter']);
	$InfoMessage['Newsletter_Updated'] = $Lang['Newsletter_Updated'];
}
$UserNewsletter = $Users->getUserNewsletterStatus($userid);

$smarty->assign('PageTitle', $Lang['Newsletter']);
$smarty->assign('Newsletter', $UserNewsletter);
$smarty->assign('Error', $Error);
$smarty->assign('InfoMessage', $InfoMessage);
$smarty->display(DOC_ROOT.'/skin/templates/user/'.'newsletter.tpl');

?>
Return current item: PHPMass Shopping Cart