当前位置: 首页>>代码示例>>PHP>>正文


PHP mslib_fe::hasProducts方法代码示例

本文整理汇总了PHP中mslib_fe::hasProducts方法的典型用法代码示例。如果您正苦于以下问题:PHP mslib_fe::hasProducts方法的具体用法?PHP mslib_fe::hasProducts怎么用?PHP mslib_fe::hasProducts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mslib_fe的用法示例。


在下文中一共展示了mslib_fe::hasProducts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

    if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry2) == 0) {
        $products[$row['products_id']] = $row;
    }
}
$content .= '<div class="main-heading"><h2>' . $this->pi_getLL('admin_label_check_2') . '</h2></div>';
foreach ($products as $row) {
    $products_id = $row['products_id'];
    $query = $GLOBALS['TYPO3_DB']->DELETEquery('tx_multishop_products_to_categories', 'products_id=' . $products_id);
    $res = $GLOBALS['TYPO3_DB']->sql_query($query);
}
$content .= '<strong>' . count($products) . '</strong> ' . $this->pi_getLL('admin_label_x_orphanned_products_to_categories_relations_has_been_deleted') . '.<br />';
$str = "SELECT categories_id from tx_multishop_categories";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
$cats = array();
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) != false) {
    if (!mslib_fe::hasProducts($row['categories_id']) and !mslib_fe::hasCats($row['categories_id'])) {
        $cats[$row['categories_id']] = $row;
    }
}
foreach ($cats as $row) {
    if ($row['categories_id']) {
        mslib_befe::deleteCategory($row['categories_id']);
    }
}
$content .= '<strong>' . count($cats) . '</strong> ' . $this->pi_getLL('admin_label_x_orphanned_categories_has_been_deleted') . '.<br />';
// chk 3 the unused options
$content .= '<div class="main-heading"><h2>' . $this->pi_getLL('admin_label_check_3') . '</h2></div>';
$str = "SELECT products_options_values_id from tx_multishop_products_options_values";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
$option_values = array();
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) != false) {
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_system_consistency_checker.php

示例2: array

<?php

$cols = array();
if ($current['content']) {
    $content .= mslib_fe::htmlBox($current['categories_name'], $current['content'], 1);
} else {
    $content .= '<div class="main-heading"><h1>' . $current['categories_name'] . '</h1></div>';
}
$counter = 0;
foreach ($categories as $category) {
    $html = '';
    if ($category['categories_name']) {
        $counter++;
        if (mslib_fe::hasProducts($category['categories_id'])) {
            // get all cats to generate multilevel fake url
            $level = 0;
            $cats = mslib_fe::Crumbar($category['categories_id']);
            $cats = array_reverse($cats);
            $where = '';
            if (count($cats) > 0) {
                foreach ($cats as $item) {
                    $where .= "categories_id[" . $level . "]=" . $item['id'] . "&";
                    $level++;
                }
                $where = substr($where, 0, strlen($where) - 1);
                $where .= '&';
            }
            $where .= 'categories_id[' . $level . ']=' . $category['categories_id'];
            // get all cats to generate multilevel fake url eof
            if ($category['categories_external_url']) {
                $link = $category['categories_external_url'];
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:menu_without_products.php

示例3: categories_ultrasearch_as_ul

 public function categories_ultrasearch_as_ul($parent_id = '0', &$content = '')
 {
     $content .= '<ul id="cat_' . $parent_id . '">';
     $categories_query = $GLOBALS['TYPO3_DB']->sql_query("select c.categories_id, cd.categories_name, c.parent_id from tx_multishop_categories c, tx_multishop_categories_description cd where c.categories_id = cd.categories_id and c.parent_id = '" . $parent_id . "' and c.page_uid='" . $this->showCatalogFromPage . "' order by c.sort_order, cd.categories_name");
     while ($categories = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($categories_query)) {
         if ($categories['categories_name']) {
             $content .= '<li><input type="checkbox" name="category_products" class="category_products" value="' . $categories['categories_id'] . '"> ';
             if (mslib_fe::hasProducts($categories['categories_id'])) {
                 // get all cats to generate multilevel fake url
                 $level = 0;
                 $cats = mslib_fe::Crumbar($categories['categories_id']);
                 $cats = array_reverse($cats);
                 $where = '';
                 if (count($cats) > 0) {
                     foreach ($cats as $item) {
                         $where .= "categories_id[" . $level . "]=" . $item['id'] . "&";
                         $level++;
                     }
                     $where = substr($where, 0, strlen($where) - 1);
                     $where .= '&';
                 }
                 $where .= 'categories_id[' . $level . ']=' . $categories['categories_id'];
                 $link = mslib_fe::typolink($this->conf['products_listing_page_pid'], '&' . $where . '&tx_multishop_pi1[page_section]=products_listing');
                 // get all cats to generate multilevel fake url eof
                 $name = '<a href="' . $link . '" class="ajax_link">' . $categories['categories_name'] . '</a>';
             } else {
                 $name = '<span>' . $categories['categories_name'] . '</span>';
             }
             $content .= $name;
             categories_ultrasearch_as_ul($categories['categories_id'], $content);
             $content .= '</li>';
         }
     }
     $content .= '</ul>';
     return $content;
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:36,代码来源:class.mslib_fe.php


注:本文中的mslib_fe::hasProducts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。