<?php global $gBitSmarty; $gBitSmarty->assign('currentCategoryId', $current_category_id); $gBitSmarty->assign('catMenu', zen_draw_pull_down_menu('cPath', zen_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"')); $catListHash = $_REQUEST; if (isset($_GET['search'])) { $prodListHash['search'] = $_GET['search']; $catListHash['search'] = $_GET['search']; } else { $catListHash['parent_id'] = $current_category_id; } $catCount = 0; if ($catList = CommerceCategory::getList($catListHash)) { $catCount = count($catList); if ($gCommerceSystem->isConfigActive('SHOW_COUNTS_ADMIN')) { foreach (array_keys($catList) as $catId) { $catList[$catId]['total_products'] = zen_get_products_to_categories($catId, true); $catList[$catId]['total_products_on'] = zen_get_products_to_categories($catId, false); } } $gBitSmarty->assign('catList', $catList); $gBitSmarty->assign('catListHash', $catListHash); } $gBitSmarty->assign('catCount', $catCount); $product = new CommerceProduct(); $offset = new splitPageResults($_GET['page'], MAX_DISPLAY_RESULTS_CATEGORIES, $products_query_raw, $products_query_numrows); $prodListHash = $_REQUEST; $prodListHash['all_status'] = 1; $prodListHash['category_id'] = $current_category_id; if ($prodList = $product->getList($prodListHash)) {
// | to obtain it through the world-wide-web, please send a note to // | license@zen-cart.com so we can mail you a copy immediately. // +----------------------------------------------------------------------+ // $Id$ // require 'includes/application_top.php'; require DIR_WS_MODULES . 'prod_cat_header_code.php'; $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!isset($_SESSION['categories_products_sort_order'])) { $_SESSION['categories_products_sort_order'] = CATEGORIES_PRODUCTS_SORT_ORDER; } if (!isset($_GET['reset_categories_products_sort_order'])) { $reset_categories_products_sort_order = $_SESSION['categories_products_sort_order']; } if (!empty($_REQUEST['cID'])) { $category = new CommerceCategory($_REQUEST['cID']); } $languages = zen_get_languages(); $gBitSmarty->assign('languages', $languages); $gBitSmarty->assign('currentCategoryId', $current_category_id); if (zen_not_null($action)) { switch ($action) { case 'set_categories_products_sort_order': $_SESSION['categories_products_sort_order'] = $_GET['reset_categories_products_sort_order']; $action = ''; zen_redirect(zen_href_link_admin(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . ((isset($_GET['pID']) and !empty($_GET['pID'])) ? '&pID=' . $_GET['pID'] : '') . ((isset($_GET['page']) and !empty($_GET['page'])) ? '&page=' . $_GET['page'] : ''))); break; case 'set_editor': if ($_GET['reset_editor'] == '0') { $_SESSION['html_editor_preference_status'] = 'NONE'; } else {