本文整理汇总了PHP中ps_product::show_price方法的典型用法代码示例。如果您正苦于以下问题:PHP ps_product::show_price方法的具体用法?PHP ps_product::show_price怎么用?PHP ps_product::show_price使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ps_product
的用法示例。
在下文中一共展示了ps_product::show_price方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: urlencode
// If no flypage is set then use the default as set in virtuemart.cfg.php
$flypage = $db_browse->sf("category_flypage");
if (empty($flypage)) {
$flypage = FLYPAGE;
}
$url_parameters = "page=shop.product_details&flypage={$flypage}&product_id=" . $db_browse->f("product_id") . "&category_id=" . $db_browse->f("category_id");
if ($manufacturer_id) {
$url_parameters .= "&manufacturer_id=" . $manufacturer_id;
}
if ($keyword != '') {
$url_parameters .= "&keyword=" . urlencode($keyword);
}
$url = $sess->url($url_parameters);
// Price: xx.xx EUR
if (_SHOW_PRICES == '1' && $auth['show_prices']) {
$product_price = $ps_product->show_price($db_browse->f("product_id"));
} else {
$product_price = "";
}
// @var array $product_price_raw The raw unformatted Product Price in Float Format
$product_price_raw = $ps_product->get_adjusted_attribute_price($db_browse->f('product_id'));
// i is the index for the array holding all products, we need to show. to allow sorting by discounted price,
// we need to use the price as first part of the index name!
$i = $product_price_raw['product_price'] . '_' . ++$counter;
if ($db_browse->f("product_thumb_image")) {
$product_thumb_image = $db_browse->f("product_thumb_image");
} else {
if ($product_parent_id != 0) {
$product_thumb_image = $dbp->f("product_thumb_image");
// Use product_thumb_image from Parent Product
} else {
示例2:
"><?php
echo $row->title;
?>
</a> </h3>
<div class="ice-vmimagearea">
<p><?php
echo ps_product::image_tag($row->product_thumb_image, "alt=\"" . $row->product_name . "\"");
?>
</p>
<span class="ice-pprice">
<?php
global $iceps_product;
if (!$iceps_product) {
$iceps_product = new ps_product();
}
echo $iceps_product->show_price($row->product_id, true, false);
?>
</span>
<?php
if (!trim(ps_product::product_has_attributes($row->product_id, true))) {
?>
<div class="ice-addtocart">
<form action="<?php
echo $row->addtocart_link;
?>
" method="post" name="addtocart" id="addtocart<?php
echo $row->product_id;
?>
" onsubmit="handleAddToCart( this.id );return false;" >
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="page" value="shop.cart" />
示例3: getProductDescription
function getProductDescription($product, &$feed_info)
{
global $VM_LANG;
$desc = "";
if ($feed_info['show_description'] != '0') {
if ($feed_info['limit_desc'] == 1) {
$desc = substr($product['description'], 0, $feed_info['text_length']);
} else {
$desc = $product['description'];
}
if ($feed_info['show_image'] == '1') {
$desc .= '<img src="' . $product['imageurl'] . '" alt="' . $product['name'] . '" vspace="5" hspace="5" align="left" border="0" />';
}
if ($feed_info['show_price'] == '1') {
require_once CLASSPATH . "ps_product.php";
$ps_product = new ps_product();
$desc .= "<br />" . $VM_LANG->_('PHPSHOP_CART_PRICE') . ": " . $ps_product->show_price($product['id']);
$desc = preg_replace("/<span class=\"product-Old-Price\"[^>]*?>(.*?)<\\/span>/si", '<strike>\\1</strike>', $desc);
}
}
return $desc;
}