本文整理匯總了PHP中Basket::activeButton方法的典型用法代碼示例。如果您正苦於以下問題:PHP Basket::activeButton方法的具體用法?PHP Basket::activeButton怎麽用?PHP Basket::activeButton使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Basket
的用法示例。
在下文中一共展示了Basket::activeButton方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Catalogue
if (!empty($id)) {
$objCatalogue = new Catalogue();
$product = $objCatalogue->getProduct($id);
if (!empty($product)) {
$category = $objCatalogue->getCategory($product['category']);
require_once '_header.php';
echo "<h1>Catalogue :: " . $category['name'] . "</h1>";
$image = !empty($product['image']) ? 'media/catalogue/' . $product['image'] : null;
if (!empty($image)) {
$width = Helper::getImgSize($image, 0);
$width = $width > 120 ? 120 : $width;
echo "<div class=\"fl_l\">";
echo "<div class=\"lft\"><img src=\"{$image}\" alt=\"";
echo Helper::encodeHTML($product['name'], 1);
echo "\" width=\"{$width}\" /></div>";
}
echo "<div class=\"rgt\"><h3>" . $product['name'] . "</h3>";
echo "<h4><strong>£" . $product['price'] . "</strong></h4>";
echo Basket::activeButton($product['id']);
echo "</div></div>";
echo "<div class=\"dev\"> </div>";
echo "<p>" . Helper::encodeHTML($product['description']) . "</p>";
echo "<div class=\"dev br_td\"> </div>";
echo "<p><a href=\"javascript:history.go(-1)\">Go back</a></p>";
require_once '_footer.php';
} else {
require_once 'error.php';
}
} else {
require_once 'error.php';
}
示例2: number_format
?>
"><?php
echo Helper::encodeHtml($row['name'], 1);
?>
</a></h4>
<h4>Price: <?php
echo Catalogue::$_currency;
echo number_format($row['price'], 2);
?>
</h4>
<p><?php
echo Helper::shortenString(Helper::encodeHtml($row['description']));
?>
</p>
<p><?php
echo Basket::activeButton($row['id']);
?>
</p>
</div>
</div>
<?php
}
echo $objPaging->getPaging();
} else {
?>
<p>There are no products in this category.</p>
<?php
}
require_once "_footer.php";