本文整理汇总了PHP中zen_get_category_name函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_category_name函数的具体用法?PHP zen_get_category_name怎么用?PHP zen_get_category_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_get_category_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showBoxCategory
function showBoxCategory($cPath_array, $ii)
{
global $db, $current_category_id, $category_depth;
$content .= '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath_array[$ii]) . '"';
if ($current_category_id == $cPath_array[$ii]) {
$content .= ' class="red b" ';
}
$content .= '> < ' . zen_get_category_name($cPath_array[$ii], $_SESSION['languages_id']) . '</a>';
$ii++;
if ($ii < sizeof($cPath_array)) {
$content .= '<div class="pad_1em">';
$content .= showBoxCategory($cPath_array, $ii);
$content .= '</div>';
} else {
if (zen_has_category_subcategories($cPath_array[$ii])) {
$content .= $cPath_array[$ii];
$content .= '<ul class="pad_1em">';
$subcategories_query = "select categories_id\n\t from " . TABLE_CATEGORIES . "\n\t where parent_id = '" . (int) $cPath_array[$ii - 1] . "' order by sort_order";
$subcategoriesArray = $db->Execute($subcategories_query);
while (!$subcategoriesArray->EOF) {
$content .= '<li><a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $subcategoriesArray->fields['categories_id']) . '"';
if ($category_depth == 'products' && $subcategoriesArray->fields['categories_id'] == $current_category_id) {
$content .= ' class="red b" ';
}
$content .= '>' . zen_get_category_name($subcategoriesArray->fields['categories_id'], $_SESSION['languages_id']) . '</a></li>';
$subcategoriesArray->MoveNext();
}
$content .= '</ul>';
} else {
print_r('ERROR');
}
}
return $content;
}
示例2: zen_get_products_name
$messageStack->add_session(SUCCESS_PRODUCT_UPDATE_SORT . $_POST['products_update_id'] . ' ' . zen_get_products_name($_POST['products_update_id'], $_SESSION['languages_id']), 'success');
zen_update_attributes_products_option_values_sort_order($_POST['products_update_id']);
$action = '';
zen_redirect(zen_href_link(FILENAME_PRODUCTS_OPTIONS_VALUES));
break;
// update by category
// update by category
case 'update_categories_attributes':
$all_products_attributes = $db->Execute("select ptoc.products_id, pa.products_attributes_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " ptoc, " . TABLE_PRODUCTS_ATTRIBUTES . " pa " . "\n where ptoc.categories_id = '" . $_POST['categories_update_id'] . "' and\n pa.products_id = ptoc.products_id");
while (!$all_products_attributes->EOF) {
$count++;
$product_id_updated .= ' - ' . $all_products_attributes->fields['products_id'] . ':' . $all_products_attributes->fields['products_attributes_id'];
zen_update_attributes_products_option_values_sort_order($all_products_attributes->fields['products_id']);
$all_products_attributes->MoveNext();
}
$messageStack->add_session(SUCCESS_CATEGORIES_UPDATE_SORT . (int) $_POST['categories_update_id'] . ' ' . zen_get_category_name($_POST['categories_update_id'], $_SESSION['languages_id']), 'success');
$action = '';
zen_redirect(zen_href_link(FILENAME_PRODUCTS_OPTIONS_VALUES));
break;
// update all products in catalog
// update all products in catalog
case 'update_all_products_attributes_sort_order':
$all_products_attributes = $db->Execute("select p.products_id, pa.products_attributes_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_ATTRIBUTES . " pa " . "\n where p.products_id= pa.products_id");
while (!$all_products_attributes->EOF) {
$count++;
zen_update_attributes_products_option_values_sort_order($all_products_attributes->fields['products_id']);
$all_products_attributes->MoveNext();
}
$messageStack->add_session(SUCCESS_PRODUCT_UPDATE_SORT_ALL, 'success');
$action = '';
zen_redirect(zen_href_link(FILENAME_PRODUCTS_OPTIONS_VALUES));
示例3: zen_draw_separator
// show the attributes
if ($products_filter != '' and $action != 'attribute_features_copy_to_product' and $action != 'attribute_features_copy_to_category' and $action != 'delete_all_attributes_confirm') {
?>
<tr>
<td colspan="2"><?php
echo zen_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
</tr>
<tr>
<td colspan="2"><table border="1" cellspacing="2" cellpadding="4" align="left">
<tr>
<td colspan="7" class="main" align="center">
<?php
echo TEXT_PRODUCTS_LISTING . TEXT_PRODUCTS_ID . $products_filter . TEXT_PRODUCT_IN_CATEGORY_NAME . zen_get_category_name(zen_get_products_category_id($products_filter), (int) $_SESSION['languages_id']) . '<br />' . zen_get_products_name($products_filter);
?>
</td>
</tr>
<tr>
<td class="smallText" align="center"><?php
echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_product_path($products_filter) . '&pID=' . $products_filter . '&product_type=' . zen_get_products_type($products_filter)) . '">' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . '<br />' . TEXT_PRODUCT_EDIT . '</a>';
?>
</td>
<td class="smallText" align="center">
<?php
if ($zc_products->get_allow_add_to_cart($products_filter) == "Y") {
echo '<a href="' . zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, '&products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id) . '">' . zen_image_button('button_products_price_manager.gif', IMAGE_PRODUCTS_PRICE_MANAGER) . '<br />' . TEXT_PRODUCTS_PRICE_MANAGER . '</a>';
} else {
echo TEXT_INFO_ALLOW_ADD_TO_CART_NO;
}
示例4: zen_get_products_master_categories_name
/**
* Count how many subcategories exist in a category
* TABLES: categories
* old v1.2 name zen_get_parent_category_name
*/
function zen_get_products_master_categories_name($categories_id)
{
global $db;
$categories_lookup = $db->Execute("select parent_id\n from " . TABLE_CATEGORIES . "\n where categories_id = '" . (int) $categories_id . "'");
$parent_name = zen_get_category_name($categories_lookup->fields['parent_id'], (int) $_SESSION['languages_id']);
return $parent_name;
}
示例5: splitPageResults
<?php
$cr_query_raw = "select * from " . TABLE_COUPON_RESTRICT . " where coupon_id = '" . $_GET['cid'] . "' and category_id != '0'";
$cr_split = new splitPageResults($_GET['cpage'], MAX_DISPLAY_RESTRICT_ENTRIES, $cr_query_raw, $cr_query_numrows);
$cr_list = $db->Execute($cr_query_raw);
while (!$cr_list->EOF) {
$rows++;
if (strlen($rows) < 2) {
$rows = '0' . $rows;
}
if ((!$_GET['cid'] || @$_GET['cid'] == $cr_list->fields['restrict_id']) && !$cInfo) {
$cInfo = new objectInfo($cr_list->fields);
}
echo ' <tr class="dataTableRow">' . "\n";
if ($cr_list->fields['category_id'] != -1) {
$coupon = $db->Execute("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . "\n where coupon_id = '" . $_GET['cid'] . "' and language_id = '" . (int) $_SESSION['languages_id'] . "'");
$category_name = zen_get_category_name($cr_list->fields['category_id'], $_SESSION['languages_id']);
} else {
$category_name = TEXT_ALL_CATEGORIES;
}
?>
<td class="dataTableContent"><?php
echo $_GET['cid'];
?>
</td>
<td class="dataTableContent" align="center"><?php
echo $coupon->fields['coupon_name'];
?>
</td>
<td class="dataTableContent" align="center"><?php
echo $cr_list->fields['category_id'];
?>
示例6: zen_href_link
*
* @package templateSystem
* @copyright Copyright 2003-2006 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_product_free_shipping_info_display.php 5369 2006-12-23 10:55:52Z drbyte $
*/
// only display when more than 1
if ($products_found_count > 1) {
?>
<div class="fr"><a href="<?php
echo zen_href_link(FILENAME_DEFAULT, 'cPath=' . zen_get_products_category_id($_GET['products_id']));
?>
" / class="b_" title="<?php
echo zen_get_category_name(zen_get_products_category_id($_GET['products_id']), $_SESSION['languages_id']);
?>
">other item in the list</a> <span id="recent_flash_smallPage" class="product_title">
<?php
//echo (PREV_NEXT_PRODUCT);
?>
<?php
//echo ($position+1 . "/" . $counter);
?>
</span></div>
<?php
}
if ($messageStack->size('product_info') > 0) {
echo $messageStack->output('product_info');
}
?>
示例7: array
<?php
/**
* @package admin
* @copyright Copyright 2003-2011 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: zones.php 19330 2011-08-07 06:32:56Z drbyte $
*/
require 'includes/application_top.php';
$tare_group_array = array(array('id' => '1', 'text' => 'Product Tare Group 1'), array('id' => '2', 'text' => 'Product Tare Group 2'), array('id' => '3', 'text' => 'Product Tare Group 3'), array('id' => '4', 'text' => 'Product Tare Group 4'), array('id' => '5', 'text' => 'Product Tare Group 5'));
if (isset($_POST['bulk_add_tare_groups']) && $_POST['bulk_add_tare_groups'] == 'true') {
$category_bulk_add = zen_db_prepare_input($_POST['category']);
$tare_group_bulk_add = zen_db_prepare_input($_POST['products_tare_group']);
product_tare_group_bulk($category_bulk_add, $tare_group_bulk_add);
$messageStack->add("Applied Product Tare Group to " . zen_get_category_name((int) $category_bulk_add, 1), 'success');
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo CHARSET;
?>
">
<title><?php
echo TITLE;
?>
示例8: zen_get_category_name
<?php
/**
* @package admin
* @copyright Copyright 2003-2006 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: salemaker_popup.php 5498 2007-01-01 04:10:07Z ajeh $
*/
//
require "includes/application_top.php";
require DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . FILENAME_SALEMAKER_POPUP . '.php';
$cname = zen_get_category_name($_GET['cid'], (int) $_SESSION['languages_id']);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo CHARSET;
?>
">
<title><?php
echo TITLE;
?>
</title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
</head>
<body>
示例9: staticCategoriesList
function staticCategoriesList($listIDs, $staticWord)
{
global $db, $currencies;
$i = 0;
$rows = 1;
$listArray = explode(',', $listIDs);
$listNum = count($listArray);
$listNum = $listNum > 8 ? 8 : $listNum;
echo '<ul class="wholesale">';
for ($i; $i < $listNum; $i++) {
$listProducts = zen_get_products_ids_categories($listArray[$i]);
if (count($listProducts) > 0) {
$result = $db->Execute("SELECT products_image, products_price\n\t \t\t FROM " . TABLE_PRODUCTS . " p \n\t \t\t WHERE p.`products_id` = " . $listProducts[0]);
if (is_int($rows / 4)) {
echo '<li>';
} else {
echo '<li class="border_r_dash">';
}
echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listArray[$i]) . '" class="ih">';
echo zen_image(DIR_WS_IMAGES . str_replace('s/', 'l/', $result->fields['products_image']), zen_get_category_name($listArray[$i], $_SESSION['languages_id']), 113, 113);
echo '</a>';
echo '<div class="margin_t pad_text">';
echo '<strong><a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listArray[$i]) . '" >' . zen_get_category_name($listArray[$i], $_SESSION['languages_id']) . '</a></strong>';
echo '<br/>' . zen_clipped_string(zen_get_category_bottom_description($listArray[$i], $_SESSION['languages_id']), ' ', 150) . '<br/>';
echo '<h4 class="red">Price: ' . $currencies->display_price($result->fields['products_price'], zen_get_tax_rate($listProducts[0])) . '</h4>';
echo '</div>';
echo '</li>';
$rows++;
} else {
//nothing
}
}
echo '</ul>';
}
示例10: zen_get_category_name
* SNAF version 1.4
* Page 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_specials_default.php 2958 2006-02-03 08:55:25Z birdbrain $
*/
?>
<div class="centerColumn" id="specialsListing">
<?php
//=========== SNAF add category name to title if appropriate (filtered by category)
if (isset($_GET['sale_category'])) {
$title_extra = ' : ' . zen_get_category_name($_GET['sale_category'], $_SESSION['languages_id']);
} else {
$title_extra = '';
}
?>
<h1 id="specialsListingHeading"><?php
echo $breadcrumb->last() . $title_extra;
?>
</h1>
<?php
//=========== eof SNAF add category name to title if appropriate
?>
<?php
//=========== bof SNAF conditional (uses default listing)
示例11: bc_get_commerce_product
$_POST['products_id'] = $_GET['products_id'];
}
$gBitProduct = bc_get_commerce_product(array('products_id' => $_REQUEST['products_id']));
if ($gBitProduct->isValid()) {
if (empty($_REQUEST['cPath']) && !empty($gBitProduct->mInfo['master_categories_id'])) {
$_REQUEST['cPath'] = $gBitProduct->mInfo['master_categories_id'];
}
} else {
global $gBitSystem;
$gBitSystem->setHttpStatus(HttpStatusCodes::HTTP_NOT_FOUND);
unset($gBitProduct);
}
}
if (empty($gBitProduct) && class_exists('CommerceProduct')) {
$gBitProduct = new CommerceProduct();
}
if (empty($_REQUEST['cPath'])) {
$_REQUEST['cPath'] = '';
}
$gComCategory = new CommerceCategory($_REQUEST['cPath']);
if (!empty($_REQUEST['cPath']) && is_numeric($_REQUEST['cPath'])) {
$breadcrumb->add(zen_get_category_name($_REQUEST['cPath'], $_SESSION['languages_id']), zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_REQUEST['cPath']));
}
if ($gBitProduct->isValid()) {
$breadcrumb->add($gBitProduct->getTitle(), $gBitProduct->getDisplayUrl());
}
if (!empty($gBitProduct)) {
$gBitSmarty->assign('gBitProduct', $gBitProduct);
}
$gBitSmarty->assign('runNormal', zen_run_normal());
$gBitThemes->loadCss(BITCOMMERCE_PKG_PATH . 'css/bitcommerce.css');
示例12: zen_display_banner
<?php
if (!$this_is_home_page) {
?>
<!--bof-banner #5 display -->
<?php
if (SHOW_BANNERS_GROUP_SET5 != '' && ($banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5))) {
if ($banner->RecordCount() > 0) {
?>
<div class="right_big_con margin_t"><center><?php
echo zen_display_banner('static', $banner);
?>
</center></div>
<?php
}
}
?>
<!--eof-banner #5 display -->
<?php
echo '<div class="right_big_con margin_t">';
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/' . $template_dir . '/related_categories.php');
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/' . $template_dir . '/search_feedback.php');
echo '</div>';
if ($current_bottom_categories_description != '') {
echo '<div class="right_big_con margin_t allborder"><div class="pad_10px">';
echo '<h3 class="line_1em">More Info About ' . zen_get_category_name($current_category_id, $_SESSION['languages_id']) . '</h3>';
echo $current_bottom_categories_description;
echo '</div></div>';
}
}
SimpleCache::End();
}
示例13: zen_display_banner
?>
<!--bof-banner #5 display -->
<?php
if (SHOW_BANNERS_GROUP_SET5 != '' && ($banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5))) {
if ($banner->RecordCount() > 0) {
?>
<div class="right_big_con margin_t"><center><?php
echo zen_display_banner('static', $banner);
?>
</center></div>
<?php
}
}
?>
<!--eof-banner #5 display -->
<?php
echo '</div>';
echo '<div class="right_big_con margin_t">';
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/' . $template_dir . '/related_categories.php');
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/' . $template_dir . '/search_feedback.php');
echo '</div>';
if ($current_bottom_categories_description != '') {
echo '<div class="right_big_con margin_t allborder"><div class="pad_10px">';
echo '<h3 class="border_b line_30px">' . BASE_COMMON_TEXT_MOREINFOABOUT . zen_get_category_name($current_category_id, $_SESSION['languages_id']) . '</h3>';
echo $current_bottom_categories_description;
echo '</div></div>';
}
echo '</div>';
}
SimpleCache::End();
}
示例14: array
$contents[] = array('text' => '<br />' . TEXT_CATEGORIES_IMAGE_MANUAL . ' ' . zen_draw_input_field('categories_image_manual'));
$contents[] = array('text' => '<br />' . TEXT_SORT_ORDER . '<br />' . zen_draw_input_field('sort_order', '', 'size="6"'));
$contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'edit_category':
// echo 'I SEE ' . $_SESSION['html_editor_preference_status'];
// set image delete
$on_image_delete = false;
$off_image_delete = true;
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>');
$contents = array('form' => zen_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . zen_draw_hidden_field('categories_id', $cInfo->categories_id));
$contents[] = array('text' => TEXT_EDIT_INTRO);
$languages = zen_get_languages();
$category_inputs_string = '';
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', zen_get_category_name($cInfo->categories_id, $languages[$i]['id']), zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name'));
}
$contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);
$category_inputs_string = '';
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ';
if ($_SESSION['html_editor_preference_status'] == 'FCKEDITOR') {
$oFCKeditor = new FCKeditor('categories_description[' . $languages[$i]['id'] . ']');
$oFCKeditor->Value = zen_get_category_description($cInfo->categories_id, $languages[$i]['id']);
$oFCKeditor->Width = '97%';
$oFCKeditor->Height = '200';
// $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ;
// $oFCKeditor->Create() ;
$output = $oFCKeditor->CreateHtml();
$category_inputs_string .= '<br />' . $output;
// $category_inputs_string .= '<IFRAME src= "' . DIR_WS_CATALOG . 'FCKeditor/fckeditor.html?FieldName=categories_description[' . $languages[$i]['id'] . ']&Upload=false&Browse=false&Toolbar=Short" width="97%" height="200" frameborder="no" scrolling="yes"></IFRAME>';
示例15: zen_get_category_name
if ($category_info->fields['categories_mixed_discount_quantity'] == 1) {
$in_categories_mixed_discount_quantity = 1;
$out_categories_mixed_diescount_quantity = 0;
} else {
$in_categories_mixed_discount_quantity = 0;
$out_categories_mixed_diescount_quantity = 1;
}
}
?>
<table cellspacing="0" cellpadding="5" id="table_info">
<tr>
<th>
<?php
echo zen_get_category_name($category_id, $_SESSION['languages_id']);
?>
- Qty Discounts
</th>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td colspan="3" class="main" valign="top" style="border-right:0;"><?php
echo TEXT_PRODUCTS_MIXED_DISCOUNT_QUANTITY;
?>
<?php
echo zen_draw_radio_field('categories_mixed_discount_quantity', '1', $in_categories_mixed_discount_quantity == 1) . ' ' . TEXT_YES . ' ' . zen_draw_radio_field('categories_mixed_discount_quantity', '0', $out_categories_mixed_diescount_quantity) . ' ' . TEXT_NO;
?>