本文整理汇总了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";