当前位置: 首页>>代码示例>>PHP>>正文


PHP product::get_image方法代码示例

本文整理汇总了PHP中product::get_image方法的典型用法代码示例。如果您正苦于以下问题:PHP product::get_image方法的具体用法?PHP product::get_image怎么用?PHP product::get_image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在product的用法示例。


在下文中一共展示了product::get_image方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

        if ($new_price = tep_get_products_special_price($products_new['products_id'])) {
            $prdct[$i]['price'] = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>';
            //        $products_price = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>';
        } else {
            $prdct[$i]['price'] = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));
            // $products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));
        }
        if ($customer_group->getdisplaytax() == '1') {
            $prdct[$i]['price'] .= '<br>' . TEXT_VAT_INFO . ' ' . $sproduct->get_tax() . ' % ' . $sproduct->get_tax_title();
        }
        if ($customer_group->getdisplayshipment() == '1') {
            $prdct[$i]['price'] .= '<br>' . TEXT_SHIPPING_HANDLING_INFO;
        }
        $prdct[$i]['products_name'] .= '<br>' . $sproduct->get_short_description();
        $prdct[$i]['link'] = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']);
        $prdct[$i]['image'] = tep_image($sproduct->get_image_path() . $sproduct->get_image(), $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
        $prdct[$i]['info'] = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']);
        $prdct[$i]['buyimage'] = tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
        $prdct[$i]['date'] = tep_date_long($products_new['products_date_added']);
        $prdct[$i]['buy'] = tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']);
        $i++;
    }
    $xoopsTpl->assign("products", $prdct);
}
if ($products_new_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3')) {
    $xoopsTpl->assign("psplit2", 1);
    $xoopsTpl->assign("new_split", $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW));
    $xoopsTpl->assign("new_split_link", $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))));
}
include_once XOOPS_ROOT_PATH . '/footer.php';
include "includes/application_bottom.php";
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:products_new.php

示例2: array

                        $lc_text .= '<br>' . TEXT_SHIPPING_HANDLING_INFO;
                    }
                    $lc_text .= '&nbsp;';
                    break;
                case 'PRODUCT_LIST_QUANTITY':
                    $lc_align = 'right';
                    $lc_text = '&nbsp;' . $listing['products_quantity'] . '&nbsp;';
                    break;
                case 'PRODUCT_LIST_WEIGHT':
                    $lc_align = 'right';
                    $lc_text = '&nbsp;' . $listing['products_weight'] . '&nbsp;';
                    break;
                case 'PRODUCT_LIST_IMAGE':
                    $lc_align = 'center';
                    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
                        $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image($sproduct->get_image_path() . $sproduct->get_image(), $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
                    } else {
                        $lc_text = '&nbsp;<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image($sproduct->get_image_path() . $sproduct->get_image(), $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>&nbsp;';
                    }
                    break;
                case 'PRODUCT_LIST_BUY_NOW':
                    $lc_align = 'center';
                    $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>&nbsp;';
                    break;
            }
            $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text);
        }
    }
    $lbox = new productListingBox($list_box_contents);
    $xoopsTpl->assign("listing_box", $lbox->content);
} else {
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:product_listing.php

示例3: sprintf

 if (tep_not_null($product_info['products_pdf'])) {
     $xoopsTpl->assign("pdf", 1);
     $xoopsTpl->assign("pdftext", sprintf(TEXT_PDF_INFO, $sproduct->get_pdf_path() . $product_info['products_pdf']));
 }
 $xoopsTpl->assign("products_name", $products_name);
 $xoopsTpl->assign("products_price", $products_price);
 if (tep_not_null($product_info['products_image'])) {
     $xoopsTpl->assign("image", 1);
     /*
     //		$pjs='<script language="javascript"><!--';
     //		$pjs.='document.write(\'<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>)');
     //		$pjs.='//--></script>'';
     //		$pjs.='<noscript>';
     */
     $pjimage = tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']);
     $pjimagetext = tep_image($sproduct->get_image_path() . $sproduct->get_image(), addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"');
     $pjimagehref = tep_href_link($sproduct->get_image_path() . $product_info['products_image']);
     $pjimagehreftext = tep_image($sproduct->get_image_path() . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"');
     $xoopsTpl->assign("pjimage", $pjimage);
     $xoopsTpl->assign("pjimagetext", $pjimagetext);
     $xoopsTpl->assign("pjimagehref", $pjimagehref);
     $xoopsTpl->assign("pjimagehreftext", $pjimagehreftext);
 }
 $xoopsTpl->assign("p_desc", stripslashes($product_info['products_description']));
 $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int) $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int) $languages_id . "'");
 $products_attributes = tep_db_fetch_array($products_attributes_query);
 $jscript .= 'var option_name = new Array;';
 if ($products_attributes['total'] > 0) {
     $xoopsTpl->assign("attr", 1);
     $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int) $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int) $languages_id . "' order by popt.products_options_name");
     $i = 0;
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:product_info.php

示例4: resize

<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php 
echo $sproduct->get_name();
?>
</title>
<base href="<?php 
echo ($request_type == 'SSL' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;
?>
">
<script language="javascript"><!--
var i=0;
function resize() {
  if (navigator.appName == 'Netscape') i=40;
  if (document.images[0]) window.resizeTo(document.images[0].width +40, document.images[0].height+80);
  self.focus();
}
//--></script>
</head>
<body onLoad="resize();">
<table><tr align="center" valign="middle"><td  valign="middle" align="center">
<?php 
echo tep_image($sproduct->get_image_path() . $sproduct->get_image(), $sproduct->get_name());
?>
</td> </tr></table>
</body>
</html>
<?php 
require 'includes/application_bottom.php';
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:popup_image.php

示例5: contentBoxHeading

$header = new contentBoxHeading($info_box_contents);
$header = $header->content;
if (!isset($new_products_category_id) || $new_products_category_id == '0') {
    $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and p.products_fsk18 <= " . $customer_group->getfsk18() . " order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
} else {
    $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id  and p.products_fsk18 <= " . $customer_group->getfsk18() . " and p2c.categories_id = c.categories_id and c.parent_id = '" . (int) $new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
}
$row = 0;
$col = 0;
$info_box_contents = array();
while ($new_products = tep_db_fetch_array($new_products_query)) {
    $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
    $sproduct = new product($new_products['products_id']);
    $add_text = '';
    if ($customer_group->getdisplaytax() == '1') {
        $add_text = '<br>' . TEXT_VAT_INFO . ' ' . $sproduct->get_tax() . ' % ' . $sproduct->get_tax_title();
    }
    if ($customer_group->getdisplayshipment() == '1') {
        $add_text .= '<br>' . TEXT_SHIPPING_HANDLING_INFO;
    }
    $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image($sproduct->get_image_path() . $sproduct->get_image(), $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . $add_text);
    $col++;
    if ($col > 2) {
        $col = 0;
        $row++;
    }
}
$new_products = new contentBox($info_box_contents);
$new_products = $new_products->content;
$new_products = $header . $new_products;
$xoopsTpl->assign("new_products", $new_products);
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:new_products.php

示例6:

     $productinfopage = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $prod_id, 'NONSSL', false, true);
 } else {
     $productinfopage = PRODUCTINFOPAGE . $prod_id;
 }
 if ($partner_id) {
     $productinfopage .= $partner_id;
 }
 if (defined('AFFILIATES_ID_FIND')) {
     $productinfopage .= AFFILIATES_ID_FIND;
 }
 if (defined('LINK_AMP_BUG')) {
     $productinfopage = str_replace('&amp;', '&', $productinfopage);
 }
 $xml_url =& $xml_item->addChild("ProductUrl", $productinfopage);
 # TODO Bildgroesse wie in elmar_products bestimmen und ausgeben. Dazu das XML-Schema products.xsd erweitern.
 $prodimg = $sproduct->get_image();
 $thumbnail = $sproduct->get_image();
 if (defined('NO_IMAGE_NAME') && $prodimg == NO_IMAGE_NAME) {
     $prodimg = '';
     $thumbnail = '';
 } else {
     if (!empty($prodimg) && !ereg('^https?:', $prodimg)) {
         $prodimg = $sproduct->get_image_path() . $prodimg;
         if (defined('THUMBNAIL_PATH')) {
             $thumbnail = THUMBNAIL_PATH . $thumbnail;
         }
     }
 }
 if (!empty($prodimg)) {
     $xml_add =& $xml_item->addChild("AdditionalResources");
     $xml_res =& $xml_add->addChild("Resource");
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:elmar_request.php


注:本文中的product::get_image方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。