public function actionIndex($page = 1) { $page = (int) $page; $count = 10; $products = Product::getProductsList($count, $page, false); if (!$products) { $products = array(); } $total = Product::getTotalProducts(false); $pagination = FunctionLibrary::buildPagination($total, $count, $page, 'page-'); require_once ROOT . '/views/admin-product/index.php'; return true; }
public function actionIndex($page = 1) { $categories = Category::getCategoryList(); if (!$categories) { $categories = array(); } $products = Product::getProductsList(9, $page); if (!$products) { $products = array(); } $total = Product::getTotalProducts(); $pagination = FunctionLibrary::buildPagination($page, $total, Product::SHOW_BY_DEFAULT, 'page-'); require_once ROOT . '/views/catalog/index.php'; return true; }
public function actionIndex($page = 1) { $page = (int) $page; $count = 9; $categories = Category::getCategoriesList(); if (!$categories) { $categories = array(); } $products = Product::getProductsList($count, $page); if (!$products) { $products = array(); } $total = Product::getTotalProducts(); $pagination = FunctionLibrary::buildPagination($total, $count, $page, 'page-'); require_once ROOT . '/views/catalog/index.php'; return true; }