本文整理汇总了PHP中zen_get_categories_name函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_categories_name函数的具体用法?PHP zen_get_categories_name怎么用?PHP zen_get_categories_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_get_categories_name函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: rss_feed_title
function rss_feed_title($feed = false)
{
global $current_category_id;
if (!$feed) {
$feed = $_GET['feed'];
} else {
if (($i = strpos($feed, '&')) !== false) {
$feed_args = substr($feed, $i + 1);
$feed = substr($feed, 0, $i);
}
}
switch (true) {
case $feed == 'news':
$title = TEXT_RSS_NEWS;
break;
case $feed == 'categories':
$title = TEXT_RSS_CATEGORIES;
if (isset($_GET['cPath']) && $current_category_id > 0) {
$title .= RSS_TITLE_DELIMITER2 . strip_tags(zen_get_categories_name((int) $current_category_id));
}
break;
case $feed == 'specials_random':
case $feed == 'specials':
$title = TEXT_RSS_SPECIALS;
break;
case $feed == 'featured_random':
case $feed == 'featured':
$title = TEXT_RSS_FEATURED_PRODUCTS;
break;
case $feed == 'best_sellers_random':
case $feed == 'best_sellers':
$title = TEXT_RSS_BEST_SELLERS;
break;
case $feed == 'upcoming_random':
case $feed == 'upcoming':
$title = TEXT_RSS_UPCOMING_PRODUCTS;
break;
case $feed == 'new_products_random':
case $feed == 'new_products':
$title = TEXT_RSS_PRODUCTS_NEW;
break;
case $feed == 'products':
if (isset($_GET['products_id'])) {
$title = TEXT_RSS_PRODUCT . RSS_TITLE_DELIMITER2 . strip_tags(zen_get_products_name((int) $_GET['products_id']));
} elseif (isset($_GET['cPath']) && $current_category_id > 0) {
$title = TEXT_RSS_PRODUCTS . RSS_TITLE_DELIMITER2 . strip_tags(zen_get_categories_name((int) $current_category_id));
} else {
$title = TEXT_RSS_PRODUCTS_ALL;
}
break;
default:
$title = TEXT_RSS_FEED;
break;
}
return $title;
}
开发者ID:happyxlq,项目名称:lt_svn,代码行数:56,代码来源:rss_feed.php
示例2: floor
$num_products_count = $new_products_query == '' ? 0 : $new_products->RecordCount();
// show only when 1 or more
if ($num_products_count > 0) {
if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS == 0) {
$col_width = floor(100 / $num_products_count);
} else {
$col_width = floor(100 / SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
}
while (!$new_products->EOF) {
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
if (!isset($productsInCategory[$new_products->fields['products_id']])) {
$productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
}
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
$col++;
if ($col > SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1) {
$col = 0;
$row++;
}
$new_products->MoveNextRandom();
}
if ($new_products->RecordCount() > 0) {
if (isset($new_products_category_id) && $new_products_category_id != 0) {
$category_title = zen_get_categories_name((int) $new_products_category_id);
$title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '') . '</h2>';
} else {
$title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</h2>';
}
$zc_show_new_products = true;
}
}
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:new_products.php
示例3: switch
// 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']));
$category_icon_display_name = zen_get_categories_name((int) $current_category_id);
$category_icon_display_image = zen_get_categories_image((int) $current_category_id);
switch (true) {
// name only
case PRODUCT_INFO_CATEGORIES_IMAGE_STATUS == 1:
$category_icon_display_image = '';
break;
// name and image but name only when blank
// name and image but name only when blank
case PRODUCT_INFO_CATEGORIES_IMAGE_STATUS == 2 && $category_icon_display_image == '':
$category_icon_display_image = '';
break;
default:
// name and image always display image regardless
$category_icon_display_image = zen_image(DIR_WS_IMAGES . $category_icon_display_image, $category_icon_display_name, CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT) . '<br />';
break;
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:category_icon_display.php
示例4: zen_get_module_directory
<?php
/**
* Module Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 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: tpl_modules_category_icon_display.php 2747 2005-12-31 06:05:37Z ajeh $
*/
require DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORY_ICON_DISPLAY);
?>
<div align="<?php
echo $align;
?>
" id="categoryIcon" class="categoryIcon"><?php
echo '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . zen_get_categories_image(zen_get_products_category_id((int) $_GET['products_id'])), zen_get_categories_name(zen_get_products_category_id((int) $_GET['products_id']), $_SESSION['languages_id']), CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT) . '<br />' . zen_get_categories_name(zen_get_products_category_id((int) $_GET['products_id']), $_SESSION['languages_id']) . '</a>';
?>
</div>
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:21,代码来源:tpl_modules_category_icon_display.php
示例5: block_xsell_products
function block_xsell_products()
{
global $db;
$return = array();
$products = array();
$title = '';
$query = "\r\n select distinct\r\n p.products_id, p.products_image,\r\n pd.products_name,\r\n pt.type_handler,\r\n mf.manufacturers_name\r\n from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p\r\n LEFT JOIN " . TABLE_PRODUCT_TYPES . " pt ON p.products_type = pt.type_id\r\n LEFT JOIN " . TABLE_MANUFACTURERS . " mf ON p.manufacturers_id = mf.manufacturers_id\r\n ," . TABLE_PRODUCTS_DESCRIPTION . " pd\r\n where xp.products_id = '" . (int) $_GET['products_id'] . "'\r\n and xp.xsell_id = p.products_id\r\n and p.products_id = pd.products_id\r\n and pd.language_id = '" . $_SESSION['languages_id'] . "'\r\n and p.products_status = 1\r\n order by xp.sort_order asc limit " . (int) MODULE_CAROUSEL_UI_MAX_DISPLAY_XSELL_PRODUCTS;
$result = $db->Execute($query);
while (!$result->EOF) {
$id = $result->fields['products_id'];
$name = $result->fields['products_name'];
$image = $result->fields['products_image'];
$manufacturers = $result->fields['manufacturers_name'];
if ($result->fields['type_handler'] == '') {
$type_handler = 'product_info';
} else {
$type_handler = $result->fields['type_handler'] . '_info';
}
$link = zen_href_link($type_handler, 'products_id=' . $id);
$price = zen_get_products_display_price($id);
$products[] = array('id' => $id, 'name' => $name, 'image' => $image, 'link' => $link, 'price' => $price, 'manufacturers' => $manufacturers);
$result->MoveNext();
}
if (count($products) > 0) {
// 表示件数の倍になるようにする
$visibleCount = (int) MODULE_CAROUSEL_UI_CONF_VISIBLE_XSELL_PRODUCTS;
if ($visibleCount == 0) {
$visibleCount = 1;
}
$addCount = count($products) % $visibleCount;
if ($addCount > 0) {
$addCount = $visibleCount - $addCount;
}
for ($i = 0; $i < $addCount; $i++) {
$products[] = array('id' => 0, 'name' => '', 'image' => '', 'link' => '', 'price' => '', 'manufacturers' => '');
}
if (isset($parent_id) && $parent_id != 0) {
$category_title = zen_get_categories_name((int) $parent_id);
$title = sprintf(MODULE_CAROUSEL_UI_BLOCK_XSELL_PRODUCTS_TITLE, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '');
} else {
$title = sprintf(MODULE_CAROUSEL_UI_BLOCK_XSELL_PRODUCTS_TITLE, strftime('%B'));
}
$return['title'] = $title;
$return['products'] = $products;
$return['ui_conf'] = array('auto' => (int) MODULE_CAROUSEL_UI_CONF_AUTO_XSELL_PRODUCTS, 'speed' => (int) MODULE_CAROUSEL_UI_CONF_SPEED_XSELL_PRODUCTS, 'vertical' => MODULE_CAROUSEL_UI_CONF_VERTICAL_XSELL_PRODUCTS == 'true' ? 'true' : 'false', 'circular' => MODULE_CAROUSEL_UI_CONF_CIRCULAR_XSELL_PRODUCTS == 'true' ? 'true' : 'false', 'visible' => (int) MODULE_CAROUSEL_UI_CONF_VISIBLE_XSELL_PRODUCTS, 'scroll' => (int) MODULE_CAROUSEL_UI_CONF_SCROLL_XSELL_PRODUCTS);
}
if ((int) MODULE_CAROUSEL_UI_CONF_VISIBLE_XSELL_PRODUCTS < count($products)) {
$return['prevbutton'] = $this->imageButton(BUTTON_IMAGE_CAROUSEL_UI_PREVIOUS, BUTTON_CAROUSEL_UI_PREVIOUS_ALT, 'class="imgover"');
$return['nextbutton'] = $this->imageButton(BUTTON_IMAGE_CAROUSEL_UI_NEXT, BUTTON_CAROUSEL_UI_NEXT_ALT, 'class="imgover"');
} else {
$return['prevbutton'] = $this->imageButton(BUTTON_IMAGE_CAROUSEL_UI_PREVIOUS_DISABLED, BUTTON_CAROUSEL_UI_DISABLED_ALT, '');
$return['nextbutton'] = $this->imageButton(BUTTON_IMAGE_CAROUSEL_UI_NEXT_DISABLED, BUTTON_CAROUSEL_UI_DISABLED_ALT, '');
}
return $return;
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:55,代码来源:module.php
示例6: floor
if ($num_products_count > 0) {
$title = '';
if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS == 0) {
$col_width = floor(100 / $num_products_count);
} else {
$col_width = floor(100 / SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
}
while (!$new_products->EOF) {
$the_categories_name_query = "select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id= '" . $new_products->fields['master_categories_id'] . "' and language_id= '" . $_SESSION['languages_id'] . "'";
$the_categories_name = $db->Execute($the_categories_name_query, null, true, CACHE_TIMELIFT);
$tpl_products['products'][$new_products->fields['products_id']] = array('id' => $new_products->fields['products_id'], 'name' => zen_get_products_name($new_products->fields['products_id']), 'href' => zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']), 'display_price' => zen_get_products_display_price($new_products->fields['products_id']), 'image' => $new_products->fields['products_image'] == '' && PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0 ? '' : $new_products->fields['products_image'], 'tax_class_id' => $new_products->fields['products_tax_class_id'], 'date_added' => $new_products->fields['products_date_added'], 'type' => $new_products->fields['products_type'], 'categories_id' => $new_products->fields['master_categories_id'], 'categories_name' => $the_categories_name->fields['categories_name'], 'categories_href' => zen_href_link(FILENAME_DEFAULT, 'cPath=' . $new_products->fields['master_categories_id']), 'is_call' => $new_products->fields['product_is_call'] ? true : false, 'is_free' => $new_products->fields['product_is_free'] == '1' ? true : false, 'display_normal_price' => get_normal_price($new_products->fields['products_id']), 'display_special_price' => get_special_price($new_products->fields['products_id']), 'display_sale_price' => get_sale_discount_price($new_products->fields['products_id']), 'content' => $new_products->fields['products_description']);
$new_products->MoveNext();
}
if (!empty($show_select_product_id)) {
//sort
$show_select_product_id = explode(',', $show_select_product_id);
$tpl_tmp_product = $tpl_products['products'];
$tpl_products['products'] = array();
foreach ($show_select_product_id as $tmp_id) {
$tpl_products['products'][$tmp_id] = $tpl_tmp_product[$tmp_id];
}
unset($tpl_tmp_product, $tmp_id);
}
if ($new_products->RecordCount() > 0) {
if (isset($new_products_category_id) && $new_products_category_id != 0) {
$tpl_products['title'] = zen_get_categories_name((int) $new_products_category_id);
} else {
}
$zc_show_new_products = true;
}
}
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:new_products.php
示例7: zen_get_module_directory
// display order dropdown
$disp_order_default = PRODUCT_NEW_LIST_SORT_DEFAULT;
require DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER);
//var $order_by
$products_new_array = array();
// display limits
// $display_limit = zen_get_products_new_timelimit();
//#################category filter###################
$products_new_query_raw = "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price,\n\t\t\t\t\t\t\t\t\t\tp.products_tax_class_id, p.products_date_added, p.products_model,\n\t\t\t\t\t\t\t\t\t\tp.products_quantity, p.products_weight, p.product_is_call,\n\t\t\t\t\t\t\t\t\t\tp.product_is_always_free_shipping, p.products_qty_box_status,\n\t\t\t\t\t\t\t\t\t\tp.master_categories_id\n\t\t\t\t\t\t\t\t FROM " . TABLE_PRODUCTS . " p\n\t\t\t\t\t\t\t\t LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n\t\t\t\t\t\t\t\t ON (p.products_id = p2c.products_id ), " . TABLE_PRODUCTS_DESCRIPTION . " pd\n\t\t\t\t\t\t\t\t WHERE p.products_status = 1\n\t\t\t\t\t\t\t\t AND p.products_id = pd.products_id \n\t\t\t\t\t\t\t\t AND p.master_categories_id=p2c.categories_id \n\t\t\t\t\t\t\t\t :category_fitler_str \t\t\t\t\t\t \n\t\t\t\t\t\t\t\t AND pd.language_id = :languageID order by rand() limit 5";
$products_new_query_raw = $db->bindVars($products_new_query_raw, ':languageID', $_SESSION['languages_id'], 'integer');
$recommend_products_result = array();
$recommend_products_cat_name = array();
foreach ($recommend_new_products_listing_filtered_categories as $parent_cat_id) {
$allowed_cate_sql = 'select distinct categories_id from ' . TABLE_CATEGORIES . '
where categories_status=1
and parent_id = ' . $parent_cat_id . ' ';
$allowed_cate_db = $db->Execute($allowed_cate_sql);
$allowed_cate_id = array($parent_cat_id);
while (!$allowed_cate_db->EOF) {
$allowed_cate_id[] = $allowed_cate_db->fields['categories_id'];
$allowed_cate_db->MoveNext();
}
$category_fitler_str = ' and p.master_categories_id in(' . implode(',', $allowed_cate_id) . ') ';
$sql = str_replace(':category_fitler_str', $category_fitler_str, $products_new_query_raw);
if ($_GET['test']) {
//echo $sql.'<br><br><br>';
}
$check_products_all = $db->Execute($sql);
$recommend_products_result[] = $check_products_all;
$recommend_products_cat_name[] = array('cat_name' => zen_get_categories_name($parent_cat_id), 'link' => zen_href_link(FILENAME_DEFAULT, '&cPath=' . $parent_cat_id));
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:header_php.php
示例8: zen_href_link
case $module_show_categories == '3':
$align = 'right';
break;
}
if ($module_next_previous != '3') {
?>
<tr>
<td colspan="3" align="<?php
echo $align;
?>
">
<?php
echo '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . zen_get_categories_image(zen_get_products_category_id((int) $_GET['products_id'])), zen_get_categories_name(zen_get_products_category_id((int) $_GET['products_id']), $_SESSION['languages_id']), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, ' align="middle"') . '</a>';
?>
<?php
echo '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . zen_get_categories_name(zen_get_products_category_id((int) $_GET['products_id']), $_SESSION['languages_id']) . '</a>';
?>
</td>
</tr>
<?php
}
// don't show when top and bottom
}
}
?>
<tr>
<td align="center" class="smallText" colspan="3"><?php
echo PREV_NEXT_PRODUCT;
echo $position + 1 . "/" . $counter;
?>
</td>
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:tpl_products_next_previous.php
示例9: array
if (!$this_is_home_page && $categories_displayTypes == 1) {
if (zen_has_category_subcategories($current_category_id)) {
$topSelling_subcategories = array();
zen_get_subcategories($topSelling_subcategories, $current_category_id);
$topSelling_subcategories_str = implode(' or pt.categories_id = ', $topSelling_subcategories);
$suffix_sql = ' AND ( pt.categories_id =' . $topSelling_subcategories_str . ')';
} else {
$suffix_sql = ' AND pt.categories_id = \'' . $current_category_id . '\'';
}
$topSellingQuery = "SELECT p.`products_id`,p.`products_image`, pd.`products_name` \n FROM products p, products_description pd,products_to_categories pt\n WHERE pd.`language_id` = {$_SESSION['languages_id']} AND p.`products_status` = 1 AND pt.products_id=p.products_id AND pd.products_id=p.products_id " . $suffix_sql . "\n ORDER BY p.`products_ordered` DESC LIMIT 5";
$topSelling = $db->Execute($topSellingQuery);
if ($topSelling->RecordCount() > 0) {
?>
<div class="allborder pad_10px">
<h2 class="red"><?php
echo BASE_COMMON_TEXT_TOPSELLINGIN . zen_get_categories_name($current_category_id);
?>
</h2>
<ul class="top_selling">
<?php
while (!$topSelling->EOF) {
?>
<li>
<a title="<?php
echo $topSelling->fields['products_name'];
?>
" href="<?php
echo zen_href_link(zen_get_info_page($topSelling->fields['products_id']), 'products_id=' . $topSelling->fields['products_id']);
?>
"><?php
echo zen_image_OLD(DIR_WS_IMAGES . $topSelling->fields['products_image'], $topSelling->fields['products_name'], 42, 42, 'class="fl"');
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:tpl_index_categories.php
注:本文中的zen_get_categories_name函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论