Пример #1
0
        if (!$featured_categories->fields['categories_image']) {
            !($featured_categories->fields['categories_image'] = 'pixel_trans.gif');
        }
        //echo $featured_categories->fields['categories_id'];
        //caizhouqing update index_pro_bigclass
        $acPath_new = zen_get_path($featured_categories->fields['categories_id']);
        // strip out 0_ from top level cats
        $acPath_new = str_replace('=0_', '=', $acPath_new);
        //    $featured_categories->fields['products_name'] = zen_get_products_name($featured_categories->fields['products_id']);
        $subCatoryQuery = 'SELECT c1.`categories_id`, c.`categories_name` FROM categories_description c, categories c1
WHERE c1.categories_id=c.categories_id and c.language_id = ' . $_SESSION['languages_id'] . ' and parent_id = ' . $featured_categories->fields['categories_id'] . ' order by sort_order asc limit 5';
        //echo $subCatoryQuery;
        //echo $cPath_new;
        //exit;
        $subCatory = $db->Execute($subCatoryQuery);
        while (!$subCatory->EOF) {
            $cPath_new = zen_get_path($subCatory->fields['categories_id']);
            $cPath_new = str_replace('=0_', '=', $cPath_new);
            $subCatoryString .= '<dt><a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '" title="' . SEO_COMMON_KEYWORDS . ' ' . $subCatory->fields['categories_name'] . '">' . $subCatory->fields['categories_name'] . '</a></dt>';
            $subCatory->MoveNext();
        }
        $subCatoryString .= '</dl><a href="' . zen_href_link(FILENAME_DEFAULT, $acPath_new) . '" class="more_product">' . BASE_COMMON_TEXT_MORESUPPLYPRODUCTS . '</a>';
        $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"', 'text' => '<div><a href="' . zen_href_link(FILENAME_DEFAULT, $acPath_new) . '" title="' . SEO_COMMON_KEYWORDS . ' ' . $featured_categories->fields['categories_name'] . '">' . zen_image(DIR_WS_IMAGES . $featured_categories->fields['categories_image'], $featured_categories->fields['categories_name'], 148, 113) . '</a></div><h3 class="margin_t line_120 pad_b2"><a href="' . zen_href_link(FILENAME_DEFAULT, $acPath_new) . '" title="' . SEO_COMMON_KEYWORDS . ' ' . $featured_categories->fields['categories_name'] . '">' . $featured_categories->fields['categories_name'] . '</a></h3>' . $subCatoryString);
        $col++;
        if ($col > MAX_DISPLAY_CATEGORIES_PER_ROW - 1) {
            $col = 0;
            $row++;
        }
        $featured_categories->MoveNext();
    }
}
        //$cInfo_array = array_merge($categories->fields, $category_childs, $category_products);
        $cInfo = new objectInfo($categories->fields);
    }
    if (isset($cInfo) && is_object($cInfo) && $categories->fields['categories_id'] == $cInfo->categories_id) {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CATEGORIES, zen_get_path($categories->fields['categories_id'])) . '\'">' . "\n";
    } else {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CATEGORIES, zen_get_path($categories->fields['categories_id'])) . '\'">' . "\n";
    }
    if ($action == '') {
        ?>
                <td class="dataTableContent" width="20" align="right"><?php 
        echo $categories->fields['categories_id'];
        ?>
</td>
                <td class="dataTableContent"><?php 
        echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, zen_get_path($categories->fields['categories_id'])) . '">' . zen_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a>&nbsp;<b>' . $categories->fields['categories_name'] . '</b>';
        ?>
</td>
                <td class="dataTableContent" align="center">&nbsp;</td>
                <td class="dataTableContent" align="right">&nbsp;<?php 
        echo zen_get_products_sale_discount('', $categories->fields['categories_id'], true);
        ?>
</td>
                <td class="dataTableContent" align="center">&nbsp;</td>
                <td class="dataTableContent" align="right" valign="bottom">
                  <?php 
        if (SHOW_COUNTS_ADMIN == 'false') {
            // don't show counts
        } else {
            // show counts
            $total_products = zen_get_products_to_categories($categories->fields['categories_id'], true);
Пример #3
0
 * @package modules
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: category_icon_display.php 16776 2010-06-24 20:48:53Z drbyte $
 */
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
if ($cPath == '' || $cPath == 0) {
    $cPath = zen_get_product_path((int) $_GET['products_id']);
}
if (!isset($_GET['cPath']) || $_GET['cPath'] == '') {
    $_GET['cPath'] = $cPath;
}
$cPath_new = zen_get_path(zen_get_products_category_id((int) $_GET['products_id']));
//      if ((zen_get_categories_image(zen_get_products_category_id((int)$_GET['products_id']))) !='') {
switch (true) {
    case $module_show_categories == '1':
        $align = 'left';
        break;
    case $module_show_categories == '2':
        $align = 'center';
        break;
    case $module_show_categories == '3':
        $align = 'right';
        break;
}
//echo 'I SEE ' . $cPath . ' vs ' . $current_category_id;
//$category_icon_display_name = zen_get_categories_name(zen_get_products_category_id((int)$_GET['products_id']), $_SESSION['languages_id']);
//$category_icon_display_image = zen_get_categories_image(zen_get_products_category_id((int)$_GET['products_id']));
Пример #4
0
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | 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: category_row.php 290 2004-09-15 19:48:26Z wilt $
//
$rows = 0;
while (!$categories->EOF) {
    $rows++;
    $cPath_new = zen_get_path($categories->fields['categories_id']);
    // strio out 0_ from top level
    $cPath_new = str_replace('=0_', '=', $cPath_new);
    $width = (int) (100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
    $newrow = false;
    if ($rows / MAX_DISPLAY_CATEGORIES_PER_ROW == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) && $rows != $number_of_categories) {
        $newrow = true;
    }
    if (!$categories->fields['categories_image']) {
        !($categories->fields['categories_image'] = 'pixel_trans.gif');
    }
    require $template->get_template_dir('tpl_index_category_row.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/' . 'tpl_index_category_row.php';
    $categories->MoveNext();
}
    if (isset($_GET['search'])) {
        $cPath = $categories->fields['parent_id'];
    }
    if (isset($cInfo) && is_object($cInfo) && $categories->fields['categories_id'] == $cInfo->categories_id) {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_ADDON_MODULES_ADMIN, 'module=point_productsrate&' . zen_get_path($categories->fields['categories_id'])) . '\'">' . "\n";
    } else {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_ADDON_MODULES_ADMIN, 'module=point_productsrate&' . zen_get_path($categories->fields['categories_id'])) . '\'">' . "\n";
    }
    if ($action == '') {
        ?>
                <td class="dataTableContent" width="20" align="right"><?php 
        echo $categories->fields['categories_id'];
        ?>
</td>
                <td class="dataTableContent"><?php 
        echo '<a href="' . zen_href_link(FILENAME_ADDON_MODULES_ADMIN, 'module=point_productsrate&' . zen_get_path($categories->fields['categories_id'])) . '">' . zen_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a>&nbsp;<b>' . $categories->fields['categories_name'] . '</b>';
        ?>
</td>
                <td class="dataTableContent" align="center">&nbsp;</td>
                <td class="dataTableContent" align="right">&nbsp;<?php 
        echo zen_get_products_sale_discount('', $categories->fields['categories_id'], true);
        ?>
</td>
                <td class="dataTableContent" align="center">&nbsp;</td>
                <td class="dataTableContent" align="right" valign="bottom">
                  <?php 
        if (SHOW_COUNTS_ADMIN == 'false') {
            // don't show counts
        } else {
            // show counts
            $total_products = zen_get_products_to_categories($categories->fields['categories_id'], true);
         $resultMeta = ep_4_query($sqlMeta) or die($ep_uses_mysqli ? mysqli_error($db->link) : mysql_error());
         $rowMeta = $ep_uses_mysqli ? mysqli_fetch_array($resultMeta) : mysql_fetch_array($resultMeta);
         $row['v_metatags_title_' . $lid] = $rowMeta['metatags_title'];
         $row['v_metatags_keywords_' . $lid] = $rowMeta['metatags_keywords'];
         $row['v_metatags_description_' . $lid] = $rowMeta['metatags_description'];
         // metaData end
         // for each language, get category description and name
         $sql2 = 'SELECT * FROM ' . TABLE_CATEGORIES_DESCRIPTION . ' WHERE categories_id = ' . $row['v_categories_id'] . ' AND language_id = ' . $lid . ' LIMIT 1 ';
         $result2 = ep_4_query($sql2);
         $row2 = $ep_uses_mysqli ? mysqli_fetch_array($result2) : mysql_fetch_array($result2);
         $row['v_categories_name_' . $lid] = $row2['categories_name'];
         $row['v_categories_description_' . $lid] = $row2['categories_description'];
     }
     // foreach
     if (EASYPOPULATE_4_CONFIG_EXPORT_URI != '0') {
         $row['v_html_uri'] = zen_catalog_href_link(FILENAME_DEFAULT, 'cPath=' . zen_get_path($row['v_categories_id']), 'NONSSL');
     }
 }
 // if ($ep_dltype ...
 // CATEGORIES EXPORT
 // chadd - 12-13-2010 - logic change. $max_categories no longer required. better to loop back to root category and
 // concatenate the entire categories path into one string with $category_delimiter for separater.
 if ($ep_dltype == 'full' || $ep_dltype == 'category') {
     // chadd - 12-02-2010 fixed error: missing parenthesis
     // NEW While-loop for unlimited category depth
     $category_delimiter = "^";
     $thecategory_id = $row['v_categories_id'];
     // starting category_id
     if ($ep_dltype == 'full' && EASYPOPULATE_4_CONFIG_EXPORT_URI != '0') {
         $sql_type = "SELECT type_handler FROM " . TABLE_PRODUCT_TYPES . " WHERE type_id = " . (int) zen_get_products_type($row['v_products_id']);
         $sql_typename = $db->Execute($sql_type);