本文整理汇总了PHP中zen_get_info_page函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_info_page函数的具体用法?PHP zen_get_info_page怎么用?PHP zen_get_info_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_get_info_page函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: parseParam
static function parseParam(&$page, &$params, $languages_id, $languages_code)
{
$pos = array_search(self::$query_key, $params);
if (!empty($params[$pos + 1])) {
$products_id = $params[$pos + 1];
// recalculate 'page', just in case the product_type passed is wrong
if (self::getMainPage() == $page) {
self::$main_page = $page = zen_get_info_page($products_id);
}
$params[$pos] = self::getName($products_id, $languages_id, $languages_code);
// recalculate cPath if needed to
/*if(self::getMainPage() == $page){
if(($cPos = array_search(categoriesParser::$query_key, $params)) !== false){
$cPath = self::getProductPath($products_id, $params[$cPos+1]);
$params[$cPos] = categoriesParser::getName($cPath, $languages_id, $languages_code);
unset($params[$cPos+1]);
}
else {
$cPath = self::getProductPath($products_id, 0);
$params = array_merge(array(categoriesParser::getName($cPath, $languages_id, $languages_code)), $params);
$pos++;
}
}*/
} else {
unset($params[$pos]);
}
unset($params[$pos + 1]);
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:28,代码来源:products.php
示例2: product_cart_button
public static function product_cart_button($product, $product_link)
{
global $how_many;
$has_attributes = zen_has_product_attributes($product->fields['products_id']);
$hide_quantity = $product->fields['products_qty_box_status'] == 0;
if ($has_attributes || PRODUCT_LIST_PRICE_BUY_NOW == '0') {
$lc_button = "<a class='btn btn-default' href='{$product_link}'>" . MORE_INFO_TEXT . "</a>";
} elseif (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
$can_add_to_cart = zen_get_products_allow_add_to_cart($product->fields['products_id']) != 'N';
$in_stock_or_ignore_stock = $product->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0;
$not_call_for_price = $product->fields['product_is_call'] == 0;
if (!$hide_quantity && $can_add_to_cart && $not_call_for_price && $in_stock_or_ignore_stock) {
$how_many++;
}
if ($hide_quantity) {
$buy_now_link = zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $product->fields['products_id']);
$buy_now_button = "<button class='btn btn-primary'>" . BUTTON_BUY_NOW_ALT . "</button>";
$lc_button = "<a href='{$buy_now_link}'>{$buy_now_button}</a>";
} else {
$add_to_cart_button = '<span class="input-group-btn">' . '<button class="btn btn-primary" type="submit">Add</button></span>';
$lc_button = "<div class='input-group'>" . "<input type='text' class='form-control' name='products_id[" . "{$product->fields['products_id']}]' value='1' size='4' />" . "{$add_to_cart_button}</div>";
}
} elseif (PRODUCT_LIST_PRICE_BUY_NOW == '2' && !$hide_quantity) {
$action_link = zen_href_link(zen_get_info_page($product->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $product->fields['products_id']);
$buy_now_qty = zen_get_buy_now_qty($product->fields['products_id']);
$lc_button = zen_draw_form('cart_quantity', $action_link, 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . $buy_now_qty . '" ' . 'maxlength="6" size="4" />' . zen_draw_hidden_field('products_id', $product->fields['products_id']) . "<button class='btn btn-default' type='submit'>" . BUTTON_IN_CART_ALT . "</button></form>";
} else {
$action_link = zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $product->fields['products_id']);
$buy_now_button = zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"');
$lc_button = "<a class='btn btn-default' href='{$action_link}'>" . BUTTON_BUY_NOW_ALT . "</a>";
}
return $lc_button;
}
开发者ID:Southern-Exposure-Seed-Exchange,项目名称:Zencart-Bootstrap-Theme,代码行数:33,代码来源:product_listing.php
示例3: zen_href_link
$link = '<a href="' . zen_href_link(FILENAME_PRODUCTS_NEW, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new->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_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$display_products_button = zen_get_buy_now_button($products_new->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_new->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_BUY_NOW, 3, 1));
} else {
$link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$the_button = $link;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$display_products_button = zen_get_buy_now_button($products_new->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_new->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_BUY_NOW, 3, 1));
}
if (PRODUCT_NEW_LIST_DESCRIPTION > '0') {
$disp_text = zen_get_products_description($products_new->fields['products_id']);
$disp_text = zen_clean_html($disp_text);
$display_products_description = stripslashes(zen_trunc_string($disp_text, PRODUCT_NEW_LIST_DESCRIPTION, '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '"> ' . MORE_INFO_TEXT . '</a>'));
} else {
$display_products_description = '';
}
?>
<ul class="list_product clear">
<li class="relative"><?php
echo $display_products_image;
?>
</li>
<li class="li_con">
<dl>
<dt><?php
echo $display_products_name;
?>
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:tpl_modules_products_new_listing.php
示例4: while
<?php
/**
* Side Box Template
*
* @package templateSystem
* @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: tpl_featured.php 18698 2011-05-04 14:50:06Z wilt $
*/
$content = "";
$content .= '<div class="sideBoxContent centeredContent">';
$featured_box_counter = 0;
while (!$random_featured_product->EOF) {
$featured_box_counter++;
$featured_box_price = zen_get_products_display_price($random_featured_product->fields['products_id']);
$content .= "\n" . ' <div class="sideBoxContentItem">';
$content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' . $random_featured_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
$content .= '<br />' . $random_featured_product->fields['products_name'] . '</a>';
$content .= '<div>' . $featured_box_price . '</div>';
$content .= '</div>';
$random_featured_product->MoveNextRandom();
}
$content .= '</div>' . "\n";
开发者ID:zenmagick,项目名称:zencart,代码行数:25,代码来源:tpl_featured.php
示例5: actionCustomerOrder
/**
* Method to handle cart Action - Customer Order
*
* @param string forward destination
* @param url parameters
*/
function actionCustomerOrder($goto, $parameters)
{
global $zco_page, $messageStack;
if ($this->display_debug_messages) {
$messageStack->add_session('header', 'FUNCTION ' . __FUNCTION__, 'caution');
}
if ($_SESSION['customer_id'] && isset($_GET['pid'])) {
if (zen_has_product_attributes($_GET['pid'])) {
zen_redirect(zen_href_link(zen_get_info_page($_GET['pid']), 'products_id=' . $_GET['pid']));
} else {
$this->add_cart($_GET['pid'], $this->get_quantity($_GET['pid']) + 1);
}
}
// display message if all is good and not on shopping_cart page
if (DISPLAY_CART == 'false' && $_GET['main_page'] != FILENAME_SHOPPING_CART && $messageStack->size('shopping_cart') == 0) {
$messageStack->add_session('header', ($this->display_debug_messages ? 'FUNCTION ' . __FUNCTION__ . ': ' : '') . SUCCESS_ADDED_TO_CART_PRODUCTS, 'success');
} else {
if (DISPLAY_CART == 'false') {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
}
}
zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters)));
}
开发者ID:jeking928,项目名称:Dual-Pricing-2.1.6,代码行数:29,代码来源:shopping_cart.php
示例6: zen_href_link
$lc_align = 'right';
$lc_text = $listing->fields['products_quantity'];
break;
case 'PRODUCT_LIST_WEIGHT':
$lc_align = 'right';
$lc_text = $listing->fields['products_weight'];
break;
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
$lc_text = '';
} else {
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
} else {
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
}
}
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;
开发者ID:dalinhuang,项目名称:kakayaga,代码行数:31,代码来源:product_listing.php
示例7: foreach
foreach ($cats as $key => $value) {
$mycats[] = $value["link"];
}
$cats = '<ul id="couponCatRestrictions">' . '<li>' . implode('<li>', $mycats) . '</ul>';
$text_coupon_help .= $cats;
$text_coupon_help .= TEXT_COUPON_HELP_PRODUCTS;
$get_result = $db->Execute("select * from " . TABLE_COUPON_RESTRICT . " where coupon_id='" . (int) $lookup_coupon_id . "' and product_id !='0'");
$prods = array();
while (!$get_result->EOF) {
if ($get_result->fields['coupon_restrict'] == 'N') {
$restrict = TEXT_PROD_ALLOWED;
} else {
$restrict = TEXT_PROD_DENIED;
}
$result = $db->Execute("SELECT * FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id and\n pd.language_id = '" . (int) $_SESSION['languages_id'] . "' and p.products_id = '" . $get_result->fields['product_id'] . "'");
$prods[] = array("validity" => $get_result->fields['coupon_restrict'] == 'N' ? 'A' : 'D', 'name' => $result->fields["products_name"], 'link' => '<a href="' . zen_href_link(zen_get_info_page($result->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($result->fields['master_categories_id']) . '&products_id=' . $result->fields['products_id']) . '">' . $result->fields['products_name'] . '</a>' . $restrict);
$get_result->MoveNext();
}
if (sizeof($prods) == 0) {
$prods[] = array("link" => TEXT_NO_PROD_RESTRICTIONS);
}
sort($prods);
$myprods = array();
foreach ($prods as $key => $value) {
$myprods[] = $value["link"];
}
$prods = '<ul id="couponProdRestrictions">' . '<li>' . implode('<li>', $myprods) . '</ul>';
$text_coupon_help .= $prods . TEXT_COUPON_GV_RESTRICTION;
}
}
// include template specific file name defines
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:header_php.php
示例8: zen_draw_form
</p>
<div class="preis">
<p>
<strong><?php
//echo TEXT_PRODUCT_PRICE;
?>
</strong>
<strong class="neue_text3"><?php
echo $products_price;
?>
</strong>
</p>
<!--bof Form start-->
<?php
echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($products_id), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data" id="products_add_form"');
?>
<!--eof Form start-->
<p class="p_top">
<?php
require $template->get_template_dir('tpl_modules_attributes.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/tpl_modules_attributes.php';
?>
<div class="clear"></div>
<?php
if (defined('AJAX_ADD_TO_CART_ENABLED') && AJAX_ADD_TO_CART_ENABLED) {
?>
<div id="a_addcart_result" class="tb-cart-info">
<div id="tb-action-hint">
<h4><?php
echo TEXT_ADD_ITEM_SUCCESS_TIP;
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:tpl_product_info_display.php
示例9: while
// $Id$
//
?>
<!-- bof: upcoming_products -->
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="tableHeading"><?php
echo TABLE_HEADING_UPCOMING_PRODUCTS;
?>
</td>
<td align="right" nowrap="nowrap" class="tableHeading"><?php
echo TABLE_HEADING_DATE_EXPECTED;
?>
</td>
</tr>
<?php
$row = 0;
while (!$expected->EOF) {
$row++;
if ($row / 2 == floor($row / 2)) {
echo ' <tr class="upcomingProducts-even">' . "\n";
} else {
echo ' <tr class="upcomingProducts-odd">' . "\n";
}
echo ' <td class="smallText"><a href="' . zen_href_link(zen_get_info_page($expected->fields['products_id']), 'products_id=' . $expected->fields['products_id']) . '">' . $expected->fields['products_name'] . '</a></td>' . "\n" . ' <td align="right" class="smallText">' . zen_date_short($expected->fields['date_expected']) . '</td>' . "\n" . ' </tr>' . "\n";
$expected->MoveNext();
}
?>
</table>
<!-- eof: upcoming_products -->
开发者ID:bitweaver,项目名称:commerce,代码行数:30,代码来源:tpl_modules_upcoming_products.php
示例10: zen_href_link
echo $list_box_contents[$row]['product_is_always_free_shipping'];
?>
</p>
<div class="black line_120 margin_t">
<strong>Our Price: </strong>
<?php
if (!empty($specials_price)) {
//caizhouqing by bof
$products_price = $products_price * ($specials_price / $products_price);
echo '<a href="' . zen_href_link(zen_get_info_page($list_box_contents[$row]['products_id']), 'cPath=' . zen_get_generated_category_path_rev($_GET['cPath']) . '&products_id=' . $list_box_contents[$row]['products_id'] . '&action=buy_now') . '" >';
echo '<span class="car_price">';
echo $list_box_contents[$row]['products_price'] == 0 ? $currencies->display_price($products_price, zen_get_tax_rate($products_tax_class_id)) : $currencies->display_price($products_price, zen_get_tax_rate($products_tax_class_id));
echo '</span>';
echo '</a>';
} elseif ($list_box_contents[$row]['products_quantity'] > 0) {
echo '<a href="' . zen_href_link(zen_get_info_page($list_box_contents[$row]['products_id']), 'cPath=' . zen_get_generated_category_path_rev($_GET['cPath']) . '&products_id=' . $list_box_contents[$row]['products_id'] . '&action=buy_now') . '" >';
echo '<span class="car_price">';
echo $list_box_contents[$row]['products_price'] == 0 ? $currencies->display_price($list_box_contents[$row]['products_price_sample'], zen_get_tax_rate($products_tax_class_id)) : $currencies->display_price($list_box_contents[$row]['products_price'], zen_get_tax_rate($products_tax_class_id));
echo '</span>';
echo '</a>';
} else {
echo '<span">';
echo $list_box_contents[$row]['products_price'] == 0 ? $currencies->display_price($list_box_contents[$row]['products_price_sample'], zen_get_tax_rate($products_tax_class_id)) : $currencies->display_price($list_box_contents[$row]['products_price'], zen_get_tax_rate($products_tax_class_id));
echo '</span>';
}
?>
<div class="margin_t">Compare at: <?php
echo $list_box_contents[$row]['products_price_retail'];
?>
</div>
<div><span class="fl"><?php
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:tpl_gallery_display.php
示例11: while
$new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS);
$row = 0;
$col = 0;
$list_box_contents = '';
$num_products_count = $new_products->RecordCount();
// show only when 1 or more
if ($num_products_count > 0) {
if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS) {
$col_width = 100 / $num_products_count;
} else {
$col_width = 100 / SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS;
}
while (!$new_products->EOF) {
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
$new_products->fields['products_name'] = zen_get_products_name($new_products->fields['products_id']);
$list_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="' . $col_width . '%" valign="top"', 'text' => '<a href="' . zen_href_link(zen_get_info_page($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']), '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)) {
$category_title = zen_get_categories_name((int) $new_products_category_id);
$title = sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '');
} else {
$title = sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'));
}
require $template->get_template_dir('tpl_modules_whats_new.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/tpl_modules_whats_new.php';
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:new_products.php
示例12: zen_get_all_get_params
</td>
</tr>
<?php
}
if ($reviews_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3')) {
?>
<tr>
<td class="pageresults"><?php
echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS);
?>
</td>
<td align="right" class="pageresults"><?php
echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'main_page')));
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php
echo '<a href="' . zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>';
?>
</td>
<td class="main" align="right"><?php
echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>';
?>
</td>
</tr>
</table>
开发者ID:bitweaver,项目名称:commerce,代码行数:30,代码来源:product_reviews.php
示例13: str_replace
<?php
/**
* Side Box 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_best_sellers.php 2982 2006-02-07 07:56:41Z birdbrain $
*/
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
$content .= '<div class="wrapper">' . "\n" . '<div class="sideBoxContentItem">' . "\n";
for ($i = 1; $i <= sizeof($bestsellers_list); $i++) {
$bestsellers_name = $bestsellers_list[$i]['name'];
//$bestsellers_name=ltrim(substr($bestsellers_name, 0, 20));
$bestsellers_list_price = zen_get_products_display_price($bestsellers_list[$i]['id']);
$content .= '<div class="sidebox_content"><div class="product_sideboximage">' . zen_image(DIR_WS_IMAGES . $bestsellers_list[$i]['products_image'], $bestsellers_list[$i]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</div>';
$content .= '<div class="product_sideboxname"><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_name, BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a>';
$content .= '<div class="sidebox_price">' . $bestsellers_list_price . '</div></div></div>';
}
$content .= '</div>' . "\n";
$content .= '</div>';
$content .= '</div>';
开发者ID:quangn92,项目名称:visualyou,代码行数:25,代码来源:tpl_best_sellers.php
示例14: die
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
if (isset($_GET['products_id']) && SHOW_PRODUCT_INFO_COLUMNS_ALSO_PURCHASED_PRODUCTS > 0 && MIN_DISPLAY_ALSO_PURCHASED > 0) {
$also_purchased_products = $db->Execute(sprintf(SQL_ALSO_PURCHASED, (int) $_GET['products_id'], (int) $_GET['products_id']));
$num_products_ordered = $also_purchased_products->RecordCount();
$row = 0;
$col = 0;
$list_box_contents = array();
$title = '';
// show only when 1 or more and equal to or greater than minimum set in admin
if ($num_products_ordered > 0 && $num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) {
while (!$also_purchased_products->EOF) {
$also_purchased_products->fields['products_name'] = zen_get_products_name($also_purchased_products->fields['products_id']);
$product_link = zen_href_link(zen_get_info_page($also_purchased_products->fields['products_id']), 'products_id=' . $also_purchased_products->fields['products_id']);
$show_image = $also_purchased_products->fields['products_image'] != '' || PRODUCTS_IMAGE_NO_IMAGE_STATUS != 0;
if ($show_image) {
$product_image = zen_image(DIR_WS_IMAGES . $also_purchased_products->fields['products_image'], $also_purchased_products->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="img-responsive img-center"');
$text = "<a class='thumbnail' href='{$product_link}'>{$product_image}" . "{$also_purchased_products->fields['products_name']}</a>";
} else {
$text = "<a href='{$product_link}'>" . "{$also_purchased_products->fields['products_name']}</a>";
}
$list_box_contents[$row][$col] = array('params' => 'class="' . BootstrapUtils::$thumbnail_grid_classes . '"', 'text' => $text);
$col++;
if ($col > SHOW_PRODUCT_INFO_COLUMNS_ALSO_PURCHASED_PRODUCTS - 1) {
$col = 0;
$row++;
}
$also_purchased_products->MoveNext();
}
开发者ID:Southern-Exposure-Seed-Exchange,项目名称:Zencart-Bootstrap-Theme,代码行数:31,代码来源:also_purchased_products.php
示例15: die
* @copyright Portions Copyright 2003 osCommerce
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$show_submit = zen_run_normal();
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');
$zco_notifier->notify('NOTIFY_MODULE_PRODUCT_LISTING_RESULTCOUNT', $listing_split->number_of_rows);
$how_many = 0;
$tpl_products = array('title' => '', 'products' => array());
if ($listing_split->number_of_rows > 0) {
$listing = $db->Execute($listing_split->sql_query, false, true, CACHE_TIMELIFT);
while (!$listing->EOF) {
$the_categories_name_query = "select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id= '" . $listing->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'][$listing->fields['products_id']] = array('name' => $listing->fields['products_name'], 'image' => $listing->fields['products_image'], 'quantity' => $listing->fields['products_quantity'], 'weight' => $listing->fields['products_weight'], 'type' => $listing->fields['products_type'], 'categories_id' => $listing->fields['master_categories_id'], 'categories_name' => $the_categories_name->fields['categories_name'], 'categories_href' => zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listing->fields['master_categories_id']), 'manufacturers_id' => $listing->fields['manufacturers_id'], 'products_price' => $listing->fields['products_price'], 'tax_class_id' => $listing->fields['products_tax_class_id'], 'description' => zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION), 'content' => $listing->fields['products_description'], 'specials_price' => $listing->fields['specials_new_products_price'], 'final_price' => $listing->fields['final_price'], 'sort_order' => $listing->fields['products_sort_order'], 'is_call' => $listing->fields['product_is_call'], 'is_always_free_shipping' => $listing->fields['product_is_always_free_shipping'], 'qty_box_status' => $listing->fields['products_qty_box_status'], 'href' => zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']), 'display_price' => zen_get_products_display_price($listing->fields['products_id']), 'is_free' => get_product_is_free($listing->fields['products_id']), 'display_normal_price' => get_normal_price($listing->fields['products_id']), 'display_special_price' => get_special_price($listing->fields['products_id']), 'display_sale_price' => get_sale_discount_price($listing->fields['products_id']));
if (PRODUCT_LIST_MANUFACTURER != 0) {
$tpl_products['products'][$listing->fields['products_id']]['show_manufacturer'] = true;
$tpl_products['products'][$listing->fields['products_id']]['manufacturers_name'] = $listing->fields['manufacturers_name'];
$tpl_products['products'][$listing->fields['products_id']]['manufacturers_href'] = zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']);
}
$listing->MoveNext();
}
$error_categories = false;
} else {
$tpl_products = array('title' => '', 'products' => array());
$error_categories = true;
}
$multiple_buy = false;
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;
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:product_listing.php
示例16: zen_get_file_directory
// }
// else
// {
// $category_depth = 'products'; // category has no products, but display the 'no products' message
// }
// }
}
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_MAIN_PAGE, 'false');
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// set the product filters according to selected product type
$typefilter = 'default';
if (isset($_GET['typefilter'])) {
$typefilter = $_GET['typefilter'];
}
require zen_get_index_filters_directory($typefilter . '_filter.php');
// query the database based on the selected filters
$listing = $db->Execute($listing_sql);
// category is invalid or has no products, so don't index it:
if ($category_depth == 'products' && $listing->RecordCount() == 0) {
$robotsNoIndex = true;
}
// if only one product in this category, go directly to the product page, instead of displaying a link to just one item:
// if filter_id exists the 1 product redirect is ignored
if (SKIP_SINGLE_PRODUCT_CATEGORIES == 'True' and (!isset($_GET['filter_id']) and !isset($_GET['alpha_filter']))) {
if ($listing->RecordCount() == 1 && (!isset($category_parent) || !$category_parent->fields['total'])) {
zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']));
}
}
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_INDEX');
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:header_php.php
示例17: array
$list_box_contents = array();
$title = '';
$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
示例18: str_replace
<?php
/**
* Side Box 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_best_sellers.php 2982 2006-02-07 07:56:41Z birdbrain $
*/
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
$content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n";
for ($i = 1; $i <= sizeof($bestsellers_list); $i++) {
$content .= '<li><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a></li>' . "\n";
}
$content .= '</ol>' . "\n";
$content .= '</div>' . "\n";
$content .= '</div>';
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:20,代码来源:tpl_best_sellers.php
示例19: sprintf
}
$email_body .= sprintf(EMAIL_TEXT_LINK, zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']), '', false) . "\n\n" . sprintf(EMAIL_TEXT_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
$html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$html_msg['EMAIL_PRODUCT_LINK'] = sprintf(str_replace('\\n\\n', '<br />', EMAIL_TEXT_LINK), '<a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id']) . '">' . $product_info->fields['products_name'] . '</a>', '', false);
$html_msg['EMAIL_TEXT_SIGNATURE'] = sprintf(str_replace('\\n', '', EMAIL_TEXT_SIGNATURE), '');
// include disclaimer
$email_body .= "\n\n" . EMAIL_ADVISORY . "\n\n";
//se
|
请发表评论