Location: PHPKode > scripts > PHPMass Shopping Cart > phpmass-shopping-cart/user/favprods.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($_GET['PageID'])) $Page = $_GET['PageID']; else $Page = 1;
if ($_GET['deleteSavedProduct']){
	$Users->deleteSavedProduct($userid,$_GET['deleteSavedProduct']);
	$InfoMessage['Product_Deleted'] = $Lang['Product_Deleted'];
}
// Products Array in this Category/in Root category
$Products = $Users->getSavedProducts($userid,$Page);
$smarty->assign('Products', $Products);

//Total Products
$TotalProducts = $Users->countSavedProducts();
if ($TotalProducts < 1) $InfoMessage['No_Prod_Found'] = $Lang['No_Prod_Found'];
$smarty->assign('TotalProducts', $TotalProducts);

// Curent URL for POST unmodified and for GET without the page number
$CurentURL = $_SERVER[REQUEST_URI];
$smarty->assign('URL', $CurentURL);
$smarty->assign('CurentURL', removeFilterFromURL($CurentURL,'page'));

// Pages Array with URL, pageID, IsHref
$PagesHtmlArr = makePagesURLs($CurentURL,$TotalProducts,$Page);
$smarty->assign('PagesHtmlArr', $PagesHtmlArr);

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



?>
Return current item: PHPMass Shopping Cart