本文整理汇总了PHP中zen_get_buy_now_button函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_buy_now_button函数的具体用法?PHP zen_get_buy_now_button怎么用?PHP zen_get_buy_now_button使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_get_buy_now_button函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zen_href_link
/* Begin listview */
/*Wishlist Links*/
if (UN_MODULE_WISHLISTS_ENABLED) {
$listview_wishlist_link = '<a class="lnk" href="' . zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $products_all->fields['products_id'] . '&action=wishlist_add_product') . '"><i class="fa fa-heart"></i>Wishlist</a>';
} else {
$listview_wishlist_link = '';
}
$listview_compare_link = '<a class="lnk" href="javascript: compareNew(' . $products_all->fields['products_id'] . ', \'add\')"><i class="fa fa-exchange"></i>Compare</a>';
/*Add to Cart Button*/
$listview_buy_now = zen_get_buy_now_button($products_all->fields['products_id'], '');
if ($buy_now != NULL) {
$listview_buy_now = '<a class="btn btn-dark-blue btn-small-med btn-trans">' . $listview_buy_now . '</a>';
} elseif ($attribute_product == $pid) {
$listview_buy_now = zen_get_buy_now_button($products_all->fields['products_id'], '<a class="btn btn-dark-blue btn-small-med btn-trans" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_all->fields['products_id']) . '">Select Options</a>');
} else {
$listview_buy_now = zen_get_buy_now_button($products_all->fields['products_id'], '<a class="btn btn-dark-blue btn-small-med btn-trans" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_all->fields['products_id']) . '">Add to Cart</a>');
}
/* End listview */
?>
<?php
if (isset($_GET['view']) && $_GET['view'] == 'rows') {
$pos_list = 'style="display: block; opacity: 1;"';
} else {
$pos_list = 'style="display: inline-block; opacity: 1;"';
}
?>
<div class="mix mix_all grid-list" <?php
echo $pos_list;
?>
>
<div data-filter="all products" data-name="<?php
示例2: zen_get_generated_category_path_rev
//$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 {
$wishlist_link = '';
}
$compare_link = 'javascript: compareNew(' . $featured_products->fields['products_id'] . ', \'add\')';
/*Wishlist/Compare Links Ends*/
$buy_now = zen_get_buy_now_button($featured_products->fields['products_id'], '');
if ($buy_now != NULL) {
$buy_now = '<a title="Sold Out" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '"><i class="fa fa-ban fa-lg"></i></a>';
} elseif ($attribute_product == $fid) {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
} else {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
}
if (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == '4') {
$grid_class = 'col-lg-3';
} elseif (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == '3') {
$grid_class = 'col-lg-4';
}
$list_box_contents[$row][$col] = array('params' => 'class="item centerBoxContentsFeatured col-xs-12 col-sm-6 col-md-3 ' . $grid_class . ' back"' . ' ', 'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '
<div class="product">
<div class="product-thumbnail">
示例3: zen_href_link
</h1></td>
<td align="center" valign="top" class="smallText">
<?php
if (zen_not_null($products_image)) {
require DIR_FS_PAGES . $current_page_base . '/main_template_vars_images.php';
}
// more info in place of buy now
if (zen_has_product_attributes($review->fields['products_id'])) {
// $link = '<p>' . '<a href="' . zen_href_link(zen_get_info_page($review->fields['products_id']), 'products_id=' . $review->fields['products_id'] ) . '">' . MORE_INFO_TEXT . '</a>' . '</p>';
$link = '';
} else {
$link = '<br /><br />' . '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now') . '">' . zen_image_button(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</a>';
}
$the_button = $link;
$products_link = '<br />';
echo zen_get_buy_now_button($review->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($review->fields['products_id']);
?>
</td>
</tr>
<?php
$review_status = " and r.`status` = '1'";
$reviews_query_raw = "select r.`reviews_id`, rd.reviews_text,\n r.reviews_rating, r.`date_added`, r.customers_name\n from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd\n where r.`products_id` = '" . (int) $_GET['products_id'] . "'\n and r.`reviews_id` = rd.`reviews_id`\n and rd.`languages_id` = '" . (int) $_SESSION['languages_id'] . "'" . $review_status . "\n order by r.`reviews_id` desc";
$reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
if ($reviews_split->number_of_rows > 0) {
if (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3') {
?>
<tr>
<td class="pagination"><?php
echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS);
?>
</td>
示例4: add_to_cart
public static function add_to_cart()
{
global $flag_show_product_info_in_cart_qty, $products_qty_box_status;
global $products_quantity_order_max, $_GET, $display_qty;
$button = '';
$show_qty_in_cart = $flag_show_product_info_in_cart_qty == 1 && $_SESSION['cart']->in_cart($_GET['products_id']);
if ($show_qty_in_cart) {
$cart_quantity = $_SESSION['cart']->get_quantity($_GET['products_id']);
$button .= '<p class="text-center" id="in-cart-text"><small>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $cart_quantity . '</small></p>';
}
$submit_button = '<button type="submit" class="btn btn-primary">' . BUTTON_IN_CART_ALT . '</button>';
$hide_quantity_input = $products_qty_box_status == 0 || $products_quantity_order_max == 1;
if ($hide_quantity_input) {
// Default to a quantity of 1
$button .= $submit_button . zen_draw_hidden_field('cart_quantity', 1) . zen_draw_hidden_field('products_id', (int) $_GET['products_id']);
} else {
$quantity = zen_get_buy_now_qty($_GET['products_id']);
$min_quantity = zen_get_products_quantity_min_units_display((int) $_GET['products_id']);
$hidden = zen_draw_hidden_field('products_id', (int) $_GET['products_id']);
$button .= <<<HTML
<div class='input-group'>
<input class='form-control' type='text' name='cart_quantity' value='{$quantity}'
maxlength='6' size='3' />
<span class='input-group-btn'>{$submit_button}</span>
</div> {$min_quantity} {$hidden}
HTML;
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $button);
$display_button = BootstrapUtils::clean_buy_now_button($display_button, '');
if ($display_button != '' || $display_qty != '') {
return "<div id='cart-add'>{$display_qty} {$display_button}</div>";
}
}
开发者ID:Southern-Exposure-Seed-Exchange,项目名称:Zencart-Bootstrap-Theme,代码行数:33,代码来源:tpl_product_info_display.php
示例5: zen_get_products_name
}
$also_purchased_products->fields['products_name'] = zen_get_products_name($also_purchased_products->fields['products_id']);
$products_name = $also_purchased_products->fields['products_name'];
//$products_name = ltrim(substr($products_name, 0, 30) . '');
/*Wishlist/Compare Links*/
if (UN_MODULE_WISHLISTS_ENABLED) {
$wishlist_link = zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $also_purchased_products->fields['products_id'] . '&action=wishlist_add_product');
} else {
$wishlist_link = '';
}
$compare_link = 'javascript: compareNew(' . $also_purchased_products->fields['products_id'] . ', \'add\')';
/*Wishlist/Compare Links Ends*/
//$also_purchased_link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
//$also_purchased_link .= 'index.html?action=buy_now&products_id=';
//$also_purchased_link .= $also_purchased_products->fields['products_id'];
$buy_now = zen_get_buy_now_button($also_purchased_products->fields['products_id'], '');
if ($buy_now != NULL) {
$buy_now = '<a title="Sold Out" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link(zen_get_info_page($also_purchased_products->fields['products_id']), 'cPath=' . $productsInCategory[$also_purchased_products->fields['products_id']] . '&products_id=' . $also_purchased_products->fields['products_id']) . '"><i class="fa fa-ban fa-lg"></i></a>';
} elseif ($attribute_product == $pid) {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $also_purchased_products->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
} else {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], 'products_id=' . $also_purchased_products->fields['products_id'] . '&action=buy_now_2') . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
}
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsAlsoPurch item"', 'text' => (($also_purchased_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '
<div class="product">
<div class="product-thumbnail">
<div class="product-thumbnail-image">
<a href="' . zen_href_link(zen_get_info_page($also_purchased_products->fields['products_id']), 'cPath=' . $productsInCategory[$also_purchased_products->fields['products_id']] . '&products_id=' . $also_purchased_products->fields['products_id']) . '">
' . zen_image(DIR_WS_IMAGES . $also_purchased_products->fields['products_image'], $also_purchased_products->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT) . '
</a>
示例6: get_product_cart_button
function get_product_cart_button($fields)
{
$cart_button = "";
$products_id = (int) $fields['products_id'];
if (zen_has_product_attributes($products_id) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
// オプション属性があったら、購入ボタンではなく詳細画面のリンクにする
$cart_button = '<a href="' . $fields['url'] . '">' . MORE_INFO_TEXT . '</a>';
} else {
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
$flag_show_product_info_in_cart_qty = zen_get_show_product_switch($products_id, 'in_cart_qty');
$display_qty = ($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($products_id)) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($products_id) . '</p>' : '';
if ($fields['products_qty_box_status'] == 0 or $fields['products_quantity_order_max'] == 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', $products_id) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . zen_get_buy_now_qty($products_id) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display($products_id) . '<br />' . zen_draw_hidden_field('products_id', $products_id) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($products_id, $the_button);
if ($display_qty != '' or $display_button != '') {
$cart_button = zen_draw_form('cart_quantity_' . $products_id, zen_href_link(zen_get_info_page($products_id), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"');
$cart_button .= '<div>';
$cart_button .= $display_qty;
$cart_button .= $display_button;
$cart_button .= '</div>';
$cart_button .= '</form>';
}
}
}
return $cart_button;
}
示例7: zen_draw_hidden_field
<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = ($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '';
if ($products_qty_box_status == 0 or $products_quantity_order_max == 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int) $_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . zen_get_buy_now_qty($_GET['products_id']) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int) $_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int) $_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = ($advanced_stock_button = zen_addOnModules_call_function('advanced_stock', 'advanced_stock_get_buy_now_button', array($_GET['products_id'], $the_button))) != '' ? $advanced_stock_button : zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php
if ($display_qty != '' or $display_button != '') {
?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
<?php
}
// display qty and button
}
// CUSTOMERS_APPROVAL == 3
示例8: 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_IN_CART, BUTTON_IN_CART_ALT) . '</a>';
if (PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART > 0 && $products_new->fields['products_qty_box_status'] != 0) {
// $how_many++;
$link = TEXT_PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $products_new->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
} else {
$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>
示例9: zen_get_generated_category_path_rev
} else {
$msg_product = "<div class='tag tag-blue' title=''><div class='text'>NEW</div></div>";
}
}
$products_name = $relatedResult->fields['products_name'];
//$products_name = ltrim(substr($products_name, 0, 35) . ''); //Trims and Limits the product name
if (!isset($productsInCategory[$relatedResult->fields['products_id']])) {
$productsInCategory[$relatedResult->fields['products_id']] = zen_get_generated_category_path_rev($relatedResult->fields['master_categories_id']);
}
if (UN_MODULE_WISHLISTS_ENABLED) {
$wishlist_link = zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $relatedResult->fields['products_id'] . '&action=wishlist_add_product');
} else {
$wishlist_link = '';
}
$compare_link = 'javascript: compareNew(' . $relatedResult->fields['products_id'] . ', \'add\')';
$buy_now = zen_get_buy_now_button($relatedResult->fields['products_id'], '');
if ($buy_now != NULL) {
$buy_now = '<a title="Sold Out" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link(zen_get_info_page($relatedResult->fields['products_id']), 'cPath=' . $productsInCategory[$relatedResult->fields['products_id']] . '&products_id=' . $relatedResult->fields['products_id']) . '"><i class="fa fa-ban fa-lg"></i></a>';
} elseif ($attribute_product == $pid) {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $relatedResult->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
} else {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $relatedResult->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
}
$list_box_contents[$row][$col] = array('params' => 'class="item centerBoxContentsRelatedProduct product-item back"' . ' ', 'text' => (($relatedResult->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<div class="product">
<div class="product-thumbnail">
<div class="product-thumbnail-image">
<a href="' . zen_href_link(zen_get_info_page($relatedResult->fields['products_id']), 'cPath=' . $productsInCategory[$relatedResult->fields['products_id']] . '&products_id=' . $relatedResult->fields['products_id']) . '">
' . zen_image(DIR_WS_IMAGES . $relatedResult->fields['products_image'], $relatedResult->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT) . '
</a>
<div class="product-thumbnail-buttons">
示例10: zen_href_link
}
/*Wishlist/Compare Links*/
if (UN_MODULE_WISHLISTS_ENABLED) {
$wishlist_link = '<a class="lnk" href="' . zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $featured_products->fields['products_id'] . '&action=wishlist_add_product') . '"><i class="fa fa-heart"></i>Wishlist</a>';
} else {
$wishlist_link = '';
}
$compare_link = '<a class="lnk" href="javascript: compareNew(' . $featured_products->fields['products_id'] . ', \'add\')"><i class="fa fa-exchange"></i>Compare</a>';
/*Wishlist/Compare Links Ends*/
$buy_now = zen_get_buy_now_button($featured_products->fields['products_id'], '');
if ($buy_now != NULL) {
$buy_now = '<a class="btn btn-blue btn-trans btn-normal sold_out">' . $buy_now . '</a>';
} elseif ($attribute_product == $fid) {
$buy_now = zen_get_buy_now_button($featured_products->fields['products_id'], '<a class="btn btn-blue btn-trans btn-normal" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '">Select Options</a>');
} else {
$buy_now = zen_get_buy_now_button($featured_products->fields['products_id'], '<a class="btn btn-blue btn-trans btn-normal" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '">Add to Cart</a>');
}
if (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == '4') {
$grid_class = 'col-lg-3';
} elseif (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == '3') {
$grid_class = 'col-lg-4';
} elseif (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == '2') {
$grid_class = 'col-lg-6';
}
$list_box_contents[$row][$col] = array('params' => 'class="item centerBoxContentsFeatured col-xs-12 col-sm-6 col-md-6 ' . $grid_class . ' back"' . ' ', 'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '
<div class="product-micro">
<div class="row product-micro-row">
<div class="col col-xs-5">
<div class="product-image">
<div class="image">
<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], SMALL_IMAGE_WIDTH, SMALLL_IMAGE_HEIGHT) . '
示例11: zen_get_products_display_price
$products_price = zen_get_products_display_price($specials->fields['products_id']);
$products_name = $specials->fields['products_name'];
//$products_name = ltrim(substr($products_name, 0, 25) . '');
$pid = $specials->fields['products_id'];
$product_attribute_query = "select distinct products_id from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='{$pid}'";
$product_attribute_query_result = $db->Execute($product_attribute_query);
$attribute_product = $product_attribute_query_result->fields['products_id'];
$products_description = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($specials->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);
//To Display Product Desc
if (UN_MODULE_WISHLISTS_ENABLED) {
$wishlist_link = zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $specials->fields['products_id'] . '&action=wishlist_add_product');
} else {
$wishlist_link = '';
}
$compare_link = 'javascript: compareNew(' . $specials->fields['products_id'] . ', \'add\')';
$buy_now = zen_get_buy_now_button($specials->fields['products_id'], '');
if ($buy_now != NULL) {
$buy_now = '<a title="Sold Out" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $specials->fields['products_id']) . '"><i class="fa fa-ban fa-lg"></i></a>';
} elseif ($attribute_product == $pid) {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $specials->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
} else {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $specials->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
}
if (mb_special_product($specials->fields['products_id']) == 1) {
$ribbon = "<div class='tag tag-orange' title=''><div class='text'>SALE</div></div>";
} else {
}
//$specials->fields['products_name'] = zen_get_products_name($specials->fields['products_id']);
$list_box_contents[$row][$col] = array('params' => 'class="specialsListBoxContents"', 'text' => '
<div class="product">
<div class="product-thumbnail">
示例12: zen_href_link
$lc_button = '';
if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
$lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
} else {
if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
if (zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N' && $listing->fields['product_is_call'] == 0 && ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0)) {
$how_many++;
}
$lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
} else {
$lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>';
}
}
$the_button = $lc_button;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$lc_text .= '<br />' . (($advanced_stock_button = zen_addOnModules_call_function('advanced_stock', 'advanced_stock_get_buy_now_button', array($listing->fields['products_id'], $the_button, $products_link))) != '' ? $advanced_stock_button : zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link)) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '' : '');
break;
case 'PRODUCT_LIST_QUANTITY':
$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 (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']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT) . '</a>';
} else {
示例13: zen_href_link
$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_name = $best_sellers_reloaded->fields['products_name'];
//$products_name = ltrim(substr($products_name, 0, 35) . '');
/*Wishlist/Compare Links*/
if (UN_MODULE_WISHLISTS_ENABLED) {
$wishlist_link = zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $best_sellers_reloaded->fields['products_id'] . '&action=wishlist_add_product');
} else {
$wishlist_link = '';
}
$compare_link = 'javascript: compareNew(' . $best_sellers_reloaded->fields['products_id'] . ', \'add\')';
/*Wishlist/Compare Links Ends*/
$buy_now = zen_get_buy_now_button($best_sellers_reloaded->fields['products_id'], '');
if ($buy_now != NULL) {
$buy_now = '<a title="Sold Out" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link(zen_get_info_page($best_sellers_reloaded->fields['products_id']), 'cPath=' . $productsInCategory[$best_sellers_reloaded->fields['products_id']] . '&products_id=' . $best_sellers_reloaded->fields['products_id']) . '"><i class="fa fa-ban fa-lg"></i></a>';
} elseif ($attribute_product == $bid) {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $best_sellers_reloaded->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
} else {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $best_sellers_reloaded->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
}
$list_box_contents[$row][$col] = array('params' => 'class="item centerBoxContentsBestSellers col-xs-12 col-sm-6 col-md-4 col-lg-3 back"' . ' ', 'text' => (($best_sellers_reloaded->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '
<div class="product">
<div class="product-thumbnail">
<div class="product-thumbnail-image">
<a href="' . zen_href_link(zen_get_info_page($best_sellers_reloaded->fields['products_id']), 'cPath=' . $productsInCategory[$best_sellers_reloaded->fields['products_id']] . '&products_id=' . $best_sellers_reloaded->fields['products_id']) . '">
' . zen_image(DIR_WS_IMAGES . $best_sellers_reloaded->fields['products_image'], $best_sellers_reloaded->fields['products_name'], IMAGE_BEST_SELLERS_LISTING_WIDTH, IMAGE_BEST_SELLERS_LISTING_HEIGHT) . '
</a>
示例14: zen_get_products_display_price
}
$products_price = zen_get_products_display_price($products->fields['products_id']);
?>
<div class="wishlist<?php
echo !un_is_empty($tdclass) ? '-' . $tdclass : '';
?>
">
<!-- buttons -->
<?php
//echo '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products->fields['products_id']) . '" title="'.BUTTON_IN_CART_ALT.'">' . zen_image_button(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT, 'style="float: right; margin-left: 5px; padding: 0;"') . '</a>';
?>
<?php
$the_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products->fields['products_id']) . '" title="' . BUTTON_IN_CART_ALT . '">' . zen_image_button(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</a>';
$display_button = zen_get_buy_now_button($products->fields['products_id'], $the_button);
if ($display_button != '') {
?>
<div class="extendedCart">
<?php
echo $display_button;
}
?>
</div>
<!-- product data -->
<h3><?php
echo $products->fields['products_name'];
?>
</h3>
<?php
echo zen_image(DIR_WS_IMAGES . $products->fields['products_image'], $products->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="productlist"');
示例15: zen_get_generated_category_path_rev
//Trims and Limits the desc
// Trims the product name
//$products_name_hover = $new_products->fields['products_name'];
//$products_name_hover = ltrim(substr($products_name_hover, 0, 50) . '...'); //Trims and Limits the product name
$products_name = $new_products->fields['products_name'];
//$products_name = ltrim(substr($products_name, 0, 20) . '..'); //Trims and Limits the product name
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']);
}
if (UN_MODULE_WISHLISTS_ENABLED) {
$wishlist_link = zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $new_products->fields['products_id'] . '&action=wishlist_add_product');
} else {
$wishlist_link = '';
}
$compare_link = 'javascript: compareNew(' . $new_products->fields['products_id'] . ', \'add\')';
$buy_now = zen_get_buy_now_button($new_products->fields['products_id'], '');
if ($buy_now != NULL) {
$buy_now = '<a title="Sold Out" class="detailbutton-wrapper add-to-cart" 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']) . '"><i class="fa fa-ban fa-lg"></i></a>';
} elseif ($attribute_product == $pid) {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
} else {
$buy_now = '<a title="Add to Cart" class="detailbutton-wrapper add-to-cart" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products->fields['products_id']) . '"><i class="fa fa-shopping-cart fa-lg"></i></a>';
}
$list_box_contents[$row][$col] = array('params' => 'class="item centerBoxContentsNewReloaded centerBoxContentsNew product-item back"' . ' ', 'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<div class="product">
<div class="product-thumbnail">
<div class="product-thumbnail-image">
<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_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT) . '
</a>
<div class="product-thumbnail-buttons">