本文整理匯總了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) {
示例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'];
示例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;
}