本文整理汇总了PHP中zen_trunc_string函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_trunc_string函数的具体用法?PHP zen_trunc_string怎么用?PHP zen_trunc_string使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_trunc_string函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
$lc_align = '';
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_align = '';
$lc_text = $listing->fields['products_model'];
break;
case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>';
} else {
$lc_text = '<a href="' . CommerceProduct::getDisplayUrlFromId($listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>';
}
// add description
if (PRODUCT_LIST_DESCRIPTION > 0) {
$lc_text .= '<div>' . zen_trunc_string(zen_clean_html(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION) . '</div>';
}
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = ' <a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a> ';
break;
case 'PRODUCT_LIST_PRICE':
$lc_price = CommerceProduct::getDisplayPriceFromHash($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = ' ' . $lc_price . ' ';
// more info in place of buy now
$lc_button = '';
if ($listing->fields['products_priced_by_attribute'] || PRODUCT_LIST_PRICE_BUY_NOW == '0' || zen_has_product_attributes($listing->fields['products_id'])) {
$lc_button = '<a href="' . CommerceProduct::getDisplayUrlFromId($listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
} else {
示例2: zen_trunc_string
//$featured_res = $db->Execute($feature_query);
$pid = $products_res->fields['products_id'];
$sid = $specials_res->fields['products_id'];
$attribute_product = $product_attribute_query_result->fields['products_id'];
if ($fid == $pid) {
$msg_product = "<div class='tag tag-orange' title=''><div class='text'>HOT</div></div>";
} else {
if ($fid == $sid) {
$msg_product = "<div class='tag tag-orange' title=''><div class='text'>SALE</div></div>";
} else {
$msg_product = "<div class='tag tag-blue' title=''><div class='text'>NEW</div></div>";
}
}
//$products_description_hover = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION); //To Display Product Desc on hover
//$products_description_hover = ltrim(substr($products_description_hover, 0, 115) . '...'); //Trims and Limits the desc on hover
$products_description = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);
//To Display Product Desc
$products_description = ltrim(substr($products_description, 0, 350) . '..');
//Trims and Limits the desc
//Productname Trim
//$products_name_hover = $featured_products->fields['products_name'];
//$products_name_hover = ltrim(substr($products_name_hover, 0, 50) . '...');
$products_name = $featured_products->fields['products_name'];
//$products_name = ltrim(substr($products_name, 0, 30) . '');
if (!isset($productsInCategory[$featured_products->fields['products_id']])) {
$productsInCategory[$featured_products->fields['products_id']] = zen_get_generated_category_path_rev($featured_products->fields['master_categories_id']);
}
/*Wishlist/Compare Links*/
if (UN_MODULE_WISHLISTS_ENABLED) {
$wishlist_link = zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $featured_products->fields['products_id'] . '&action=wishlist_add_product');
} else {
示例3: add_cart
/**
* Method to add an item to the cart
*
* This method is usually called as the result of a user action.
* As the method name applies it adds an item to the uses current cart
* and if the customer is logged in, also adds to the database sored
* cart.
*
* @param integer the product ID of the item to be added
* @param decimal the quantity of the item to be added
* @param array any attributes that are attache to the product
* @param boolean whether to add the product to the notify list
* @return void
* @global object access to the db object
* @todo ICW - documentation stub
*/
function add_cart($products_id, $qty = '1', $attributes = '', $notify = true)
{
global $db, $messageStack;
if ($this->display_debug_messages) {
$messageStack->add_session('header', 'FUNCTION ' . __FUNCTION__, 'caution');
}
if (!is_numeric($qty) || $qty < 0) {
// adjust quantity when not a value
$chk_link = '<a href="' . zen_href_link(zen_get_info_page($products_id), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($products_id)) . '&products_id=' . $products_id) . '">' . zen_get_products_name($products_id) . '</a>';
$messageStack->add_session('header', ERROR_CORRECTIONS_HEADING . ERROR_PRODUCT_QUANTITY_UNITS_SHOPPING_CART . $chk_link . ' ' . PRODUCTS_ORDER_QTY_TEXT . zen_output_string_protected($qty), 'caution');
$qty = 0;
}
$this->notify('NOTIFIER_CART_ADD_CART_START', array(), $products_id, $qty, $attributes, $notify);
$products_id = zen_get_uprid($products_id, $attributes);
if ($notify == true) {
$_SESSION['new_products_id_in_cart'] = $products_id;
}
$qty = $this->adjust_quantity($qty, $products_id, 'shopping_cart');
if ($this->in_cart($products_id)) {
$this->update_quantity($products_id, $qty, $attributes);
} else {
$this->contents[] = array($products_id);
$this->contents[$products_id] = array('qty' => (double) $qty);
// insert into database
if (isset($_SESSION['customer_id'])) {
$sql = "insert into " . TABLE_CUSTOMERS_BASKET . "\n (customers_id, products_id, customers_basket_quantity,\n customers_basket_date_added)\n values ('" . (int) $_SESSION['customer_id'] . "', '" . zen_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "')";
$db->Execute($sql);
}
if (is_array($attributes)) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
//CLR 020606 check if input was from text box. If so, store additional attribute information
//CLR 020708 check if text input is blank, if so do not add to attribute lists
//CLR 030228 add htmlspecialchars processing. This handles quotes and other special chars in the user input.
$attr_value = NULL;
$blank_value = FALSE;
if (strstr($option, TEXT_PREFIX)) {
if (trim($value) == NULL) {
$blank_value = TRUE;
} else {
$option = substr($option, strlen(TEXT_PREFIX));
$attr_value = stripslashes($value);
$value = PRODUCTS_OPTIONS_VALUES_TEXT_ID;
// -----
// Check that the length of this TEXT attribute is less than or equal to its "Max Length" definition. While there
// is some javascript on a product details' page that limits the number of characters entered, the customer
// can choose to disable javascript entirely or circumvent that checking by performing a copy&paste action.
//
$check = $db->Execute("SELECT products_options_length FROM " . TABLE_PRODUCTS_OPTIONS . " WHERE products_options_id = " . (int) $option . " LIMIT 1");
if (!$check->EOF) {
if (strlen($attr_value) > $check->fields['products_options_length']) {
$attr_value = zen_trunc_string($attr_value, $check->fields['products_options_length'], '');
}
$this->contents[$products_id]['attributes_values'][$option] = $attr_value;
}
}
}
if (!$blank_value) {
if (is_array($value)) {
reset($value);
while (list($opt, $val) = each($value)) {
$this->contents[$products_id]['attributes'][$option . '_chk' . $val] = $val;
}
} else {
$this->contents[$products_id]['attributes'][$option] = $value;
}
// insert into database
//CLR 020606 update db insert to include attribute value_text. This is needed for text attributes.
//CLR 030228 add zen_db_input() processing
if (isset($_SESSION['customer_id'])) {
// if (zen_session_is_registered('customer_id')) zen_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text) values ('" . (int)$customer_id . "', '" . zen_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "', '" . zen_db_input($attr_value) . "')");
if (is_array($value)) {
reset($value);
while (list($opt, $val) = each($value)) {
$products_options_sort_order = zen_get_attributes_options_sort_order(zen_get_prid($products_id), $option, $opt);
$sql = "insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . "\n (customers_id, products_id, products_options_id, products_options_value_id, products_options_sort_order)\n values ('" . (int) $_SESSION['customer_id'] . "', '" . zen_db_input($products_id) . "', '" . (int) $option . '_chk' . (int) $val . "', '" . (int) $val . "', '" . $products_options_sort_order . "')";
$db->Execute($sql);
}
} else {
if ($attr_value) {
$attr_value = zen_db_input($attr_value);
}
$products_options_sort_order = zen_get_attributes_options_sort_order(zen_get_prid($products_id), $option, $value);
$sql = "insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . "\n (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text, products_options_sort_order)\n values ('" . (int) $_SESSION['customer_id'] . "', '" . zen_db_input($products_id) . "', '" . (int) $option . "', '" . (int) $value . "', '" . $attr_value . "', '" . $products_options_sort_order . "')";
//.........这里部分代码省略.........
示例4: zen_image
echo zen_image(DIR_WS_IMAGES . $product['products_image'], addslashes($product['products_name']), 180, 200, ' class="float_left"');
?>
</a>
</dt>
<dd class="explan_name">
<a href="<?php
echo $product['products_url_link'];
?>
" title="<?php
echo $product['products_name'];
?>
">
<?php
echo zen_trunc_string($product['products_name'], 100, true);
?>
</a>
</dd>
<dd style=" position:relative; margin-top:5px; margin-left:15px;">
<span class="sale_price"><?php
echo 'Price:$' . $product['products_price'];
?>
</span>
</dd>
</dl>
</div>
<?php
}
示例5: zen_href_link
$link = '<a href="' . zen_href_link(FILENAME_ALL_PRODUCTS, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_all->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a> ';
}
}
$the_button = $link;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$display_products_button = zen_get_buy_now_button($products_all->fields['products_id'], $the_button, $products_link) . zen_get_products_quantity_min_units_display($products_all->fields['products_id']) . str_repeat('', substr(PRODUCT_ALL_BUY_NOW, 3, 1));
} else {
$link = '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$the_button = $link;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$display_products_button = zen_get_buy_now_button($products_all->fields['products_id'], $the_button, $products_link) . zen_get_products_quantity_min_units_display($products_all->fields['products_id']) . str_repeat('', substr(PRODUCT_ALL_BUY_NOW, 3, 1));
}
if (PRODUCT_ALL_LIST_DESCRIPTION > '0') {
$disp_text = zen_get_products_description($products_all->fields['products_id']);
$disp_text = zen_clean_html($disp_text);
$display_products_description = stripslashes(zen_trunc_string($disp_text, PRODUCT_ALL_LIST_DESCRIPTION));
} else {
$display_products_description = '';
}
$get_discount_prod = mb_discount_product($products_all->fields['products_id']);
if (mb_featured_product($products_all->fields['products_id']) == 1) {
$ribbon = "<div class='tag tag-orange' title=''><div class='text'>HOT</div></div>";
} else {
if (mb_special_product($products_all->fields['products_id']) == 1) {
$ribbon = "<div class='tag tag-orange' title=''><div class='text'>SALE</div></div>";
} else {
if (mb_new_product($products_all->fields['products_id']) == 1) {
$ribbon = "<div class='tag tag-blue' title=''><div class='text'>NEW</div></div>";
} else {
}
}
示例6: while
<?php
/**
* Side Box Template
*
* @package templateSystem
* @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: tpl_reviews_random.php 16044 2010-04-23 01:15:45Z drbyte $
*/
$content = "";
$review_box_counter = 0;
while (!$random_review_sidebox_product->EOF) {
$review_box_counter++;
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_review_sidebox_product->fields['products_id'] . '&reviews_id=' . $random_review_sidebox_product->fields['reviews_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_review_sidebox_product->fields['products_image'], $random_review_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . zen_trunc_string(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60) . '</a><br /><br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $random_review_sidebox_product->fields['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_review_sidebox_product->fields['reviews_rating']));
$content .= '</div>';
$random_review_sidebox_product->MoveNextRandom();
}
示例7: array
$zc_col_count_description = 0;
$lc_align = '';
$list_box_contents = array();
//echo $listing_split->sql_query;
//print_r(explode(' ',zen_products_id_in_category($current_category_id)));
if (zen_count_products_in_category($current_category_id) > 0) {
$listing = $db->Execute($listing_split->sql_query);
$row = 0;
while (!$listing->EOF) {
if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
$list_box_contents[$row]['products_image'] = '';
} else {
$list_box_contents[$row]['products_image'] = $listing->fields['products_image'];
}
$list_box_contents[$row]['products_name'] = $listing->fields['products_name'];
$list_box_contents[$row]['products_description'] = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), 100);
$list_box_contents[$row]['products_price'] = zen_get_products_base_price($listing->fields['products_id']);
$list_box_contents[$row]['actual_price'] = $currencies->display_price(zen_get_products_actual_price($listing->fields['products_id']), zen_get_tax_rate($product_check->fields['products_tax_class_id']));
$list_box_contents[$row]['products_status'] = $listing->fields['products_status'];
if ($listing->fields['product_is_always_free_shipping'] == 0) {
$list_box_contents[$row]['product_is_always_free_shipping'] = '';
} else {
$list_box_contents[$row]['product_is_always_free_shipping'] = '<span class="free_shipping"></span>';
}
if ($listing->fields['product_is_free'] == 0) {
$list_box_contents[$row]['product_is_free'] = '';
} else {
$list_box_contents[$row]['product_is_free'] = '<span class="free"></span>';
}
$list_box_contents[$row]['products_quantity_order_min'] = $listing->fields['products_quantity_order_min'];
$list_box_contents[$row]['products_id'] = $listing->fields['products_id'];
示例8: zen_trunc_string
?>
" target="_blank">
<?php
echo zen_trunc_string($blog_article['title'], 30, true);
?>
</a>
</b>
</p>
<p>
<i>
<a href="<?php
echo $blog_article['blog_link'];
?>
" target="_blank">
"<?php
echo zen_trunc_string(zen_clean_html($blog_article['content']), 50, true);
?>
"
</a>
</i>
</p>
<p class="red">
<?php
echo zen_not_null($blog_article['author']) ? $blog_article['author'] : '';
?>
<?php
echo $blog_article['date'];
?>
</p>
<?php
示例9: array
}
break;
}
$list_box_contents[$rows][$col] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text);
}
// add description and match alternating colors
if (PRODUCT_LIST_DESCRIPTION > 0) {
$rows++;
if ($extra_row == 1) {
$list_box_description = "productListing-data-description-even";
$extra_row = 0;
} else {
$list_box_description = "productListing-data-description-odd";
$extra_row = 1;
}
$list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"', 'text' => zen_trunc_string(zen_clean_html(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION));
}
$listing->MoveNext();
}
$error_categories == false;
} else {
$list_box_contents = array();
$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS);
$error_categories = true;
}
if ($how_many > 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0 and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3)) {
$show_top_submit_button = 'true';
}
if ($how_many > 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0 and PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) {
$show_bottom_submit_button = 'true';
示例10: zen_href_link
<tr id="tr_goods_374846">
<td class="pay_gods_img">
<?php
echo $thumbnail;
?>
</td>
<td>
<div class="sopcarinfo">
<a href="<?php
echo zen_href_link(zen_get_info_page($order->products[$i]['id']), 'products_id=' . $order->products[$i]['id']);
?>
" target="_blank" style="color:#000000">
<?php
echo zen_trunc_string($order->products[$i]['name'], 110, true);
?>
<?php
echo $stock_check[$i];
?>
</a>
<?php
// if there are attributes, loop thru them and display one per line
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
echo '<div class="cartAttribsList">';
for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
?>
<div class="cart_attr">
<b>·</b>
示例11: while
if ($frist_get_pid_db4->RecordCount() > 0) {
while (!$frist_get_pid_db4->EOF) {
$frist_get_pid4[] = $frist_get_pid_db4->fields['products_id'];
$frist_get_pid_db4->MoveNext();
}
$frist_pid_str4 = implode(',', $frist_get_pid4);
$best_sellers_query = "select distinct p.products_id, pd.products_name, \n\t\t\t\t\t\t\t\t\t\tp.products_ordered,p.products_image \n\t\t\t\t\t\t\t\t from " . TABLE_PRODUCTS . " p, " . 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_ordered > 0\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 pd.language_id = '" . (int) $_SESSION['languages_id'] . "' \n\t\t\t\t\t\t\t\t and p.products_id in(" . $frist_pid_str4 . ")";
}
if (!empty($best_sellers_query)) {
$best_sellers = $db->Execute($best_sellers_query);
}
}
if ($best_sellers->RecordCount() >= MIN_DISPLAY_BESTSELLERS) {
$title = '';
$box_id = 'bestsellers';
$rows = 0;
while (!$best_sellers->EOF) {
$global_id_excluded[] = $best_sellers->fields['products_id'];
$rows++;
$bestsellers_list[$rows]['id'] = $best_sellers->fields['products_id'];
$bestsellers_list[$rows]['name'] = zen_trunc_string($best_sellers->fields['products_name'], 30, true);
$bestsellers_list[$rows]['image'] = $best_sellers->fields['products_image'];
$bestsellers_list[$rows]['price'] = zen_get_products_display_price($best_sellers->fields['products_id']);
$best_sellers->MoveNext();
}
$title_link = false;
require $template->get_template_dir('tpl_product_info_best_sellers.php', DIR_WS_TEMPLATE, $current_page_base, 'sideboxes') . '/tpl_product_info_best_sellers.php';
$title = BOX_HEADING_BESTSELLERS;
require $template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base, 'common') . '/' . $column_box_default;
}
}
示例12: zen_href_link
for ($i = 1; $i <= sizeof($products_accessories); $i++) {
?>
<li>
<a href="<?php
echo zen_href_link(zen_get_info_page($products_accessories[$i]['id']), 'products_id=' . $products_accessories[$i]['id']);
?>
">
<?php
echo zen_image(DIR_WS_IMAGES . $products_accessories[$i]['image'], addslashes($products_accessories[$i]['name']), 48, 33);
?>
</a>
<p>
<a href="<?php
echo zen_href_link(zen_get_info_page($products_accessories[$i]['id']), 'products_id=' . $products_accessories[$i]['id']);
?>
">
<?php
echo zen_trunc_string($products_accessories[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE);
?>
</a>
</p>
</li>
<?php
}
?>
</ul>
</div>
<?php
}
示例13: foreach
?>
<div class="a_z_con">
<ul class="a_z_grid_left">
<?php
foreach ($products_tags as $pt) {
?>
<li>
<a href="<?php
echo $pt['product_link'];
?>
" title="<?php
echo $pt['product_name'];
?>
">
<?php
echo zen_trunc_string($pt['product_name'], 50);
?>
</a>
</li>
<?php
}
?>
</ul>
</div>
<?php
} else {
?>
<div class="a_z_con">No products start from <?php
echo $_GET['tag'];
?>
</div>
示例14: zen_href_link
$category_displayed = $faqs_all->fields['faq_categories_name'];
echo '<h3>' . $category_displayed . '</h3>';
}
echo '<div class="margin_t">';
if (FAQ_ALL_LIST_NAME != '0') {
$display_faqs_name = '<a class="u" href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . $faqs_all->fields['faqs_name'] . '</a>' . str_repeat('<br clear="all" />', substr(FAQ_ALL_LIST_NAME, 3, 1));
} else {
$display_faqs_name = '';
}
$link = '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . MORE_INFO_TEXT . '</a>';
$the_button = $link;
$faqs_link = '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . MORE_INFO_TEXT . '</a>';
if (FAQ_ALL_LIST_DESCRIPTION != '0') {
$disp_text = zen_get_faqs_description($faqs_all->fields['faqs_id']);
$disp_text = zen_clean_html($disp_text);
$display_faqs_description = stripslashes(zen_trunc_string($disp_text, 150, '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '"> ' . MORE_INFO_TEXT . '</a>'));
} else {
$display_faqs_description = '';
}
echo '<h4 class="margin_t bg_help">' . $display_faqs_name . '</h4>';
if (FAQ_ALL_LIST_DESCRIPTION != 0 && $current_faq_category_id != 0) {
echo '<ul>' . $display_faqs_description . '</ul>';
}
echo '</div>';
$faqs_all->MoveNext();
}
} else {
echo '<div class="error_box">' . TEXT_NO_ALL_FAQS . '</div>';
}
?>
示例15: convert_product_result
function convert_product_result($fields)
{
$fields['path_image'] = self::get_product_path_image($fields);
$fields['name'] = $fields['products_name'];
$fields['url'] = zen_href_link(zen_get_info_page($fields['products_id']), 'products_id=' . $fields['products_id'] . '&categories_id=' . $this->search_params['categories_id']);
$fields['description'] = zen_trunc_string(zen_clean_html(stripslashes($fields['products_description']), PRODUCT_LIST_DESCRIPTION));
$fields['model'] = $fields['products_model'];
$fields['quantity'] = $fields['products_quantity'];
$fields['date_added'] = zen_date_long($fields['products_date_added']);
$fields['price'] = $fields['products_price'];
#FIXME
$fields['final_price'] = zen_get_products_display_price($fields['products_id']);
$fields['cart_button'] = self::get_product_cart_button($fields);
$categories = self::get_product_categories($fields['products_id']);
foreach ($categories as $category_id) {
$fields['categories_path'][] = self::get_categories_path($category_id, self::get_super_products_list_link('results'));
}
$fields['always_free_shipping'] = $fields['product_is_always_free_shipping'];
return $fields;
}