本文整理汇总了PHP中global_common::buildPriceLink方法的典型用法代码示例。如果您正苦于以下问题:PHP global_common::buildPriceLink方法的具体用法?PHP global_common::buildPriceLink怎么用?PHP global_common::buildPriceLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类global_common
的用法示例。
在下文中一共展示了global_common::buildPriceLink方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildPathProduct
public function buildPathProduct($connection, $productID, $type)
{
$objRetailer = new Model_Retailer($connection);
$inPrices = $objRetailer->getRetailerByProduct($productID);
//'<a href="#" class="link">Chi tiết sản phẩm</a> =>
//<a href="#" class="link">Hàng mới từ 12.000.000đ</a> |
//<span>Hàng mới cũ 10.000.000đ</span> | <a href="#" class="link">Hàng refurbished từ 12.000.000đ</a> ';
$path = '<a href="' . global_common::buildProductLink($productID) . '" class="link">Chi tiết sản phẩm</a> =>';
$priceNew = 0;
$priceUsed = 0;
$priceRefur = 0;
foreach ($inPrices as $item) {
if ($item[global_mapping::ProductStatusID] == global_common::STATUS_PRODUCT_NEW) {
$priceNew = global_common::FormatPrice($item[global_mapping::Price]);
}
if ($item[global_mapping::ProductStatusID] == global_common::STATUS_PRODUCT_USED) {
$priceUsed = global_common::FormatPrice($item[global_mapping::Price]);
}
if ($item[global_mapping::ProductStatusID] == global_common::STATUS_PRODUCT_Refurbished) {
$priceRefur = global_common::FormatPrice($item[global_mapping::Price]);
}
}
if ($type == global_common::STATUS_PRODUCT_NEW) {
$path .= '<a href="' . global_common::buildPriceLink($productID, global_common::STATUS_PRODUCT_NEW) . '" class="link active">Hàng mới từ ' . $priceNew . '</a> | ';
} else {
$path .= '<a href="' . global_common::buildPriceLink($productID, global_common::STATUS_PRODUCT_NEW) . '" class="link">Hàng mới từ ' . $priceNew . '</a> | ';
}
if ($type == global_common::STATUS_PRODUCT_USED) {
$path .= '<a href="' . global_common::buildPriceLink($productID, global_common::STATUS_PRODUCT_USED) . '" class="link active">Hàng cũ từ ' . $priceUsed . '</a> | ';
} else {
$path .= '<a href="' . global_common::buildPriceLink($productID, global_common::STATUS_PRODUCT_USED) . '" class="link">Hàng cũ từ ' . $priceUsed . '</a> | ';
}
if ($type == global_common::STATUS_PRODUCT_Refurbished) {
$path .= '<a href="' . global_common::buildPriceLink($productID, global_common::STATUS_PRODUCT_Refurbished) . '" class="link active">Hàng Refurbished từ ' . $priceRefur . '</a>';
} else {
$path .= '<a href="' . global_common::buildPriceLink($productID, global_common::STATUS_PRODUCT_Refurbished) . '" class="link">Hàng Refurbished từ ' . $priceRefur . '</a>';
}
return $path;
}