本文整理汇总了PHP中zen_get_products_image函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_products_image函数的具体用法?PHP zen_get_products_image怎么用?PHP zen_get_products_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_get_products_image函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zen_get_products_image
</th>
<?php
}
?>
<th scope="col" id="myAccountTotal"><?php
echo HEADING_TOTAL;
?>
</th>
</tr>
<?php
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
?>
<tr>
<!--JT mod - Product Image-->
<td class="accountQuantityDisplay"><?php
echo zen_get_products_image($order->products[$i]['id'], IMAGE_ON_INVOICE_IMAGE_WIDTH, IMAGE_ON_INVOICE_IMAGE_HEIGHT);
?>
</td>
<!--JT mod - Product Image-->
<td class="accountQuantityDisplay"><?php
echo $order->products[$i]['qty'] . QUANTITY_SUFFIX;
?>
</td>
<td class="accountProductDisplay"><?php
echo $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
echo '<ul id="orderAttribsList">';
for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
echo '<li>' . $order->products[$i]['attributes'][$j]['option'] . TEXT_OPTION_DIVIDER . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])) . '</li>';
}
echo '</ul>';
示例2: max
$small_height = SMALL_IMAGE_HEIGHT;
$medium_width = MEDIUM_IMAGE_WIDTH;
$medium_height = MEDIUM_IMAGE_HEIGHT;
$large_width = LARGE_IMAGE_WIDTH;
$large_height = LARGE_IMAGE_HEIGHT;
$k = max($oiheight / $small_height, $oiwidth / $small_width);
//use smallest size
$small_width = round($oiwidth / $k);
$small_height = round($oiheight / $k);
$k = max($oiheight / $medium_height, $oiwidth / $medium_width);
//use smallest size
$medium_width = round($oiwidth / $k);
$medium_height = round($oiheight / $k);
$large_width = $oiwidth;
$large_height = $oiheight;
$products_image = zen_get_products_image((int) $products_id);
$products_image_extension = substr($products_image, strrpos($products_image, '.'));
$products_image_base = preg_replace('/' . $products_image_extension . '/', '', $products_image);
$filename_medium = DIR_FS_CATALOG . DIR_WS_IMAGES . 'medium/' . $products_image_base . IMAGE_SUFFIX_MEDIUM . '.' . $fname[2];
$filename_large = DIR_FS_CATALOG . DIR_WS_IMAGES . 'large/' . $products_image_base . IMAGE_SUFFIX_LARGE . '.' . $fname[2];
// ImageMagick
if (IMAGE_MANAGER_HANDLER == '1') {
copy($src, $filename_large);
copy($src, $filename_medium);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $large_width . " " . $filename_large);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $medium_width . " " . $filename_medium);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $small_width . " " . $filename_small);
}
}
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_POST['search']) ? '&search=' . $_POST['search'] : '')));
} else {
示例3: 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" . '<ul style="list-style: none!important">' . "\n";
for ($i = 1; $i <= sizeof($bestsellers_list); $i++) {
$content .= '<li ><a style="padding: 10%" href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_get_products_image($bestsellers_list[$i]['id']) . '<br/>' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a></li>' . "\n";
}
$content .= '</ul>' . "\n";
$content .= '</div>' . "\n";
$content .= '</div>';
示例4: zen_image_button
$counter++;
}
if ($previous == -1) {
$previous = $last;
}
$sql = "select categories_name\r\n from " . TABLE_CATEGORIES_DESCRIPTION . "\r\n where categories_id = {$current_category_id} AND language_id = '" . $_SESSION['languages_id'] . "'";
$category_name_row = $db->Execute($sql);
}
// if is_array
// previous_next button and product image settings
// include products_image status 0 = off 1= on
// 0 = button only 1= button and product image 2= product image only
$previous_button = zen_image_button(BUTTON_IMAGE_PREVIOUS, BUTTON_PREVIOUS_ALT);
$next_item_button = zen_image_button(BUTTON_IMAGE_NEXT, BUTTON_NEXT_ALT);
$previous_image = zen_get_products_image($previous, PREVIOUS_NEXT_IMAGE_WIDTH, PREVIOUS_NEXT_IMAGE_HEIGHT) . '<br />';
$next_item_image = zen_get_products_image($next_item, PREVIOUS_NEXT_IMAGE_WIDTH, PREVIOUS_NEXT_IMAGE_HEIGHT) . '<br />';
if (SHOW_PREVIOUS_NEXT_STATUS == 0) {
$previous_image = '';
$next_item_image = '';
} else {
if (SHOW_PREVIOUS_NEXT_IMAGES >= 1) {
if (SHOW_PREVIOUS_NEXT_IMAGES == 2) {
$previous_button = '';
$next_item_button = '';
}
if ($previous == $next_item) {
$previous_image = '';
$next_item_image = '';
}
} else {
$previous_image = '';
示例5: zen_get_products_image
echo TABLE_HEADING_TOTAL_EXCLUDING_TAX;
?>
</td>
<td class="dataTableHeadingContent" align="right"><?php
echo TABLE_HEADING_TOTAL_INCLUDING_TAX;
?>
</td>
</tr>
<?php
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
$priceIncTax = $currencies->format(zen_round(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), $currencies->get_decimal_places($order->info['currency'])) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
} else {
$priceIncTax = $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
}
echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right"><img src="' . DIR_WS_CATALOG . DIR_WS_IMAGES . zen_get_products_image($order->products[$i]['id']) . '" align="left" width="' . IMAGE_ON_INVOICE_IMAGE_WIDTH . '" height="' . IMAGE_ON_INVOICE_IMAGE_HEIGHT . '" />' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
echo '<br /><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
if ($order->products[$i]['attributes'][$j]['price'] != '0') {
echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
}
if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
echo TEXT_INFO_ATTRIBUTE_FREE;
}
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format(zen_round($order->products[$i]['final_price'], $currencies->get_decimal_places($order->info['currency'])) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $priceIncTax . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n";
echo ' </tr>' . "\n";
}
示例6: foreach
*
* @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 = '<ul class="recent_view pad_10px">' . "\n";
foreach ($recommendationsArray as $product) {
//caizhouqing by bof
$rs = $db->Execute("select s.specials_new_products_price,p.products_price from (specials s,products p) where s.products_id = p.products_id and p.products_id=" . $product);
$products_price = $rs->fields['products_price'];
$specials_price = $rs->fields['specials_new_products_price'];
//caizhouqing update specials
$rsp = $db->Execute("select products_quantity from products where products_id=" . $product);
$products_quantity = $rsp->fields['products_quantity'];
//product
if ($products_price != "") {
$discount = 100 - $specials_price / $products_price * 100;
}
$link = zen_href_link(zen_get_info_page($product), 'products_id=' . $product);
$content .= '<li>' . "\n";
if ($products_quantity == 0) {
$content .= '<span class="sold_out_cart"></span>';
} elseif (!empty($specials_price)) {
$content .= '<span class="sold_discount_cart"><span class="sold_discount_cart_font">' . $discount . '</span></span>';
}
//caizhouqing update by eof my_order
$content .= "\n" . '<a class="ih" href="' . $link . '">' . zen_get_products_image($product, '85', '85') . '</a>' . "\n" . '<span><a href="' . $link . '">' . zen_get_products_name($product, $_SESSION['languages_id']) . '</a></span>' . "\n" . '</li>';
}
$content .= '</ul>';
示例7: zen_get_products_image
<th scope="col" id="ccTotalHeading"><?php
echo TABLE_HEADING_TOTAL;
?>
</th>
</tr>
<tr>
<td colspan="5"><hr /></td>
</tr>
<?php
// now loop thru all products to display quantity and price
?>
<?php
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
?>
<?php
$thumbnail = zen_get_products_image($order->products[$i]['id'], 40, 42);
?>
<tr class="<?php
echo $order->products[$i]['rowClass'];
?>
">
<td class="cartQuantity"><?php
echo $order->products[$i]['qty'];
?>
x</td>
<td class="cartImage"><?php
echo $thumbnail;
?>
</td>
<td class="cartProductDisplay" colspan="2"><?php
echo $order->products[$i]['name'];
示例8: back_in_stock_send
function back_in_stock_send($product_id = 0, $bis_id = 0, $preview = true)
{
global $db;
cleanse_back_in_stock_subscriptions();
if ($product_id != 0) {
$addtl_where = ' AND product_id=' . $product_id;
} else {
$addtl_where = '';
}
if ($bis_id != 0) {
$addtl_where .= ' AND bis_id=' . $bis_id;
}
// Find all Items in notifications
$bis_emails = array();
$now = time();
$bis_products = $db->Execute("SELECT p.products_id, pd.products_name, b.product_id, b.last_sent, b.email, b.name, b.bis_id, b.active_til_purch, b.sub_active FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_BACK_IN_STOCK . " b WHERE p.products_id = pd.products_id AND p.products_id = b.product_id AND p.products_quantity > 0 AND sub_active=1 " . $addtl_where);
while (!$bis_products->EOF) {
echo 'Back in stock: ' . $bis_products->fields['products_name'] . "\n" . "<br/>";
$your_date = strtotime($bis_products->fields['last_sent']);
$datediff = $now - $your_date;
$days_since = floor($datediff / (60 * 60 * 24));
if (BACK_IN_STOCK_DAYS_WAITING > $days_since && BACK_IN_STOCK_DAYS_WAITING != '0') {
$bis_products->MoveNext();
}
$bis_emails[] = array('email' => $bis_products->fields['email'], 'name' => stripslashes($bis_products->fields['name']), 'product_id' => $bis_products->fields['product_id'], 'bis_id' => $bis_products->fields['bis_id'], 'active_til_purch' => $bis_products->fields['active_til_purch']);
$bis_products->MoveNext();
}
$counted = 0;
if (!$preview) {
foreach ($bis_emails as $emails) {
if ($emails['email'] == '') {
continue;
}
if ($counted >= (int) BACK_IN_STOCK_MAX_EMAILS_PER_BATCH && BACK_IN_STOCK_MAX_EMAILS_PER_BATCH != '0') {
break;
}
$customers_name = stripslashes($emails['name']);
$customers_email = $emails['email'];
$html_message = array();
$html_message['CUSTOMERS_NAME'] = $customers_name;
$html_message['PRODUCT_NAME'] = strip_tags(zen_get_products_name($emails['product_id']));
$html_message['SPAM_LINK'] = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'index.php?main_page=back_in_stock&bis_id=' . $emails['bis_id'];
$html_message['TOP_MESSAGE'] = BACK_IN_STOCK_MAIL_TOP . $html_message['PRODUCT_NAME'] . "\n" . "\n" . BACK_IN_STOCK_MAIL_AVAILABLE;
if (BACK_IN_STOCK_DESC_IN_EMAIL == 1) {
$html_message['PRODUCT_DESCRIPTION'] = zen_get_products_description($emails['product_id']);
} else {
$html_message['PRODUCT_DESCRIPTION'] = " ";
}
$html_message['PRODUCT_IMAGE'] = zen_get_products_image($emails['product_id'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
$html_message['PRODUCT_LINK'] = zen_href_link('product_info', 'products_id=' . $emails['product_id']);
$html_message['BOTTOM_MESSAGE'] = BACK_IN_STOCK_MAIL_BOTTOM;
$email_text = BACK_IN_STOCK_MAIL_GREETING . $customers_name . ',' . "\n" . "\n" . $html_message['TOP_MESSAGE'] . "\n" . "\n" . $html_message['PRODUCT_NAME'] . "\n" . $html_message['PRODUCT_DESCRIPTION'] . "\n" . $html_message['PRODUCT_LINK'] . "\n" . "\n" . $html_message['BOTTOM_MESSAGE'] . "\n" . "\n" . BACK_IN_STOCK_MAIL_CANCEL . "\n" . $html_message['SPAM_LINK'] . "\n";
$counted++;
zen_mail($customers_name, $customers_email, $html_message['PRODUCT_NAME'] . BACK_IN_STOCK_MAIL_BACK . STORE_NAME, $email_text, STORE_NAME, EMAIL_FROM, $html_message, 'back_in_stock_notification');
if (BACK_IN_STOCK_SEND_ADMIN_EMAIL == 'true') {
zen_mail('', BACK_IN_STOCK_ADMIN_EMAIL, $html_message['PRODUCT_NAME'] . BACK_IN_STOCK_MAIL_BACK . STORE_NAME, $email_text, STORE_NAME, EMAIL_FROM, $html_message, 'back_in_stock_notification');
}
echo BACK_IN_STOCK_MAIL_SENT . $customers_email . "\n" . "<br/>";
$modify_subscription = array('bis_id' => $emails['bis_id'], 'sub_active' => $emails['active_til_purch'], 'last_sent' => "NOW()");
back_in_stock_subscription($modify_subscription, "modify");
}
?>
<br/>
Processed <?php
echo $counted;
?>
Notifications
<?php
if ($counted == (int) BACK_IN_STOCK_MAX_EMAILS_PER_BATCH) {
echo BACK_IN_STOCK_MAIL_MANY;
}
}
if ($preview) {
?>
<br/>Preview:</br>
<table>
<tr>
<th>Customers Name</th>
<th>Customers Email</th>
<th>Product</th>
</tr>
<?php
foreach ($bis_emails as $emails) {
if ($counted >= (int) BACK_IN_STOCK_MAX_EMAILS_PER_BATCH && BACK_IN_STOCK_MAX_EMAILS_PER_BATCH != '0') {
break;
}
$counted++;
?>
<tr>
<td><?php
echo stripslashes($emails['name']);
?>
</td>
<td><?php
echo $emails['email'];
?>
</td>
<td><?php
echo zen_get_products_name($emails['product_id']);
?>
//.........这里部分代码省略.........
示例9: zen_get_products_name
<div style="display: none;">
<div id="back-in-stock-popup-wrapper">
<?php
if (BACK_IN_STOCK_SHOW_PRODUCT_INFO == "true") {
?>
<div id="back-in-stock-product">
<div id="back-in-stock-product-name">
<h2 id="productName">
<?php
echo zen_get_products_name(zen_db_prepare_input($_GET[products_id]));
?>
</h2>
</div>
<div id="back-in-stock-product-image">
<?php
echo zen_get_products_image(zen_db_prepare_input($_GET[products_id]));
?>
</div>
</div>
<div class="clearBoth"></div>
<?php
}
?>
<div id="back-in-stock-popup-headline-wrapper">
<h2><?php
echo BACK_IN_STOCK_POPUP_HEADING;
?>
</h2>
<h3><?php
echo BACK_IN_STOCK_POPUP_SUBHEADING;
?>
示例10: foreach
* @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 = '<ul>' . "\n";
foreach ($recent_viewed as $recent_product) {
$link = zen_href_link(zen_get_info_page($recent_product), 'products_id=' . $recent_product);
//bof by caizhouqing cart
$rs = $db->Execute("select s.specials_new_products_price,p.products_price from (specials s,products p) where s.products_id = p.products_id and p.products_id=" . $recent_product);
$products_price = $rs->fields['products_price'];
//caizhouqing update specials
$specials_price = $rs->fields['specials_new_products_price'];
//---------
$rsp = $db->Execute("select products_quantity from products where products_id=" . $recent_product);
$products_quantity = $rsp->fields['products_quantity'];
//product
if ($products_price != "") {
$discount = 100 - $specials_price / $products_price * 100;
}
$content .= '<li style="text-align:center;">';
if ($products_quantity == 0) {
$content .= '<span class="sold_out_cart"></span>';
} elseif (!empty($specials_price)) {
$content .= '<span class="sold_discount_sidebox"><span class="sold_discount_font_sidebox">' . round($discount) . '</span></span>';
}
$content .= "\n" . '<a class="ih" href="' . $link . '">' . zen_get_products_image($recent_product, '85', '85') . '</a>' . "<br />" . '<div style="text-align:left;"><a href="' . $link . '">' . zen_get_products_name($recent_product, $_SESSION['languages_id']) . '</a></div>' . "\n" . '</li>';
}
$content .= '</ul>';
//eof by caizhouqing cart
//caizhouqing update cart_up_pic
示例11: unserialize
}
}
if ($need_tr) {
if ($col > 0) {
echo '<td style="border:none;" width="' . (THUMB_IMAGE_WIDTH + 6) * $col . 'px" colspan="' . $col . '">';
}
echo '</tr>';
}
echo '</table></td></tr>';
}
$cart_contents = unserialize($lt_row->fields['cart_contents']);
if (!empty($cart_contents)) {
echo '<tr><td class="dataTableContent"><strong>' . TABLE_TEXT_CUSTOMERS_CART . '(value=' . $currencies->format($lt_row->fields['cart_total']) . ') : </strong><table cellspacing=0 cellpadding=0 border=0><tr>';
foreach ($cart_contents as $product_id => $qty_array) {
$products_name = zen_get_products_name($product_id);
echo '<td><table cellspacing=0 cellpadding=2 border=0 align="center" style="border:1px solid #000;"><tr><td align="center">' . zen_image(DIR_WS_CATALOG_IMAGES . zen_get_products_image($product_id), $products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</td></tr><tr><td class="dataTableContent" align="center">' . $products_name . '</td></tr><tr><td class="dataTableContent">' . TABLE_TEXT_QUANTITY . $qty_array['qty'] . '</td></tr></table></td>';
}
echo '</tr></table></td></tr>';
}
echo '</table>';
$lt_row->MoveNext();
}
//End While
?>
<strong><a href="<?php
echo zen_href_link(FILENAME_SUPERTRACKER, 'report=last_ten&offset=' . ($offset + 10) . '&filter=' . $filter . '&refer_match=' . $_GET['refer_match']);
?>
"><?php
echo TABLE_TEXT_NEXT_TEN_RESULTS;
?>
</a></strong>