本文整理汇总了PHP中global_common::buildProductLink方法的典型用法代码示例。如果您正苦于以下问题:PHP global_common::buildProductLink方法的具体用法?PHP global_common::buildProductLink怎么用?PHP global_common::buildProductLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类global_common
的用法示例。
在下文中一共展示了global_common::buildProductLink方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<div class="portlet-body">
<table class="table table-bordered table-hover article-profile">
<thead>
<tr>
<th class="span4">Tên sản phẩm</th>
<th>Nhà SX</th>
<th>Danh mục</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ($products as $item) {
if ($item[global_mapping::IsDeleted] != true) {
echo ' <tr>';
echo ' <td><a href="' . global_common::buildProductLink($item[global_mapping::ProductID]) . '" >' . $item[global_mapping::ProductName] . '</a></td>';
echo ' <td class="">' . $item[global_mapping::ManufactoryName] . '</td>';
echo ' <td class="">' . $item[global_mapping::ArticleTypeName] . '</td>';
echo ' <td class="article-control">';
echo ' <a href="post_product.php?pid=' . $item[global_mapping::ProductID] . '" class="btn btn-mini">Sửa</a>';
//echo ' <a href="javascript:article.refreshArticle(\''.$item[global_mapping::ArticleID].'\')" class="btn btn-mini">Làm mới</a>';
if ($item[global_mapping::IsDeleted] == true) {
//echo '<a href="javascript:product.activateProduct(\''.$item[global_mapping::ProductID].'\',0)" class="btn btn-mini">Phục hồi</a>';
} else {
echo '<a href="javascript:product.activateProduct(\'' . $item[global_mapping::ProductID] . '\',1)" class="btn btn-mini">Xóa</a>';
}
//echo ' <a href="javascript:article.activeArticle(\''.$item[global_mapping::ArticleID].'\',0)" class="btn btn-mini">Xóa</a>';
echo ' </td>';
echo ' </tr>';
}
}
示例2: 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;
}
示例3: foreach
foreach ($products as $item) {
echo '<tr>';
echo '<td>';
echo $item[global_mapping::ProductName];
echo '</td>';
echo '<td>';
echo $item[global_mapping::CreatedBy][global_mapping::UserName];
echo '</td>';
echo '<td>';
echo global_common::formatDateTimeVN($item[global_mapping::CreatedDate]);
echo '</td>';
echo '<td>';
echo global_common::formatDateTimeVN($item[global_mapping::ModifiedDate]);
echo '</td>';
echo '<td style="padding:0;width:200px">';
echo '<a href="' . global_common::buildProductLink($item[global_mapping::ProductID], true) . '" target="_blank" class="btn btn-mini"> View</a> ';
echo '<a href="javascript:product.showPopupEditStorePrice(\'' . $item[global_mapping::ProductID] . '\',\'' . str_replace("'", " ", $item[global_mapping::ProductName]) . '\',\'modal-add\', product.AdminPage)" class="btn btn-mini">Store Price</a>';
if ($item[global_mapping::IsDeleted] == true) {
echo '<a href="javascript:product.activateProduct(\'' . $item[global_mapping::ProductID] . '\',0, product.AdminPage)" class="btn btn-mini">Bán lại</a>';
} else {
echo '<a href="javascript:product.activateProduct(\'' . $item[global_mapping::ProductID] . '\',1, product.AdminPage)" class="btn btn-mini">Dừng bán</a>';
}
echo '</td>';
echo '</tr>';
}
echo '</table>';
echo global_common::getPagingHTMLByNum($page, Model_ProductPrice::NUM_PER_PAGE, $total, 'core.util.changePage', 'admin_product');
}
?>
</div>
</div>
示例4:
echo $intMode ? 'Cập nhật giá sản phẩm' : 'Đăng giá sản phẩm';
?>
</h1>
</div>
</div>
<div class="control-group zone">
<div class="controls">
<h2 class="m-wrap zone-title">Thông tin tổng quát</h2>
</div>
</div>
<div class="control-group">
<label class="control-label">Tên sản phẩm</label>
<div class="controls">
<a href="<?php
echo global_common::buildProductLink($currentProduct[global_mapping::ProductID]);
?>
" target="_blank" class="m-wrap"><?php
echo $currentProduct[global_mapping::ProductName];
?>
</a>
</div>
</div>
<div class="control-group">
<label class="control-label">Hình thức sản phẩm *</label>
<div class="controls">
<select class="span6 chosen" name="cmProductStatus" id="cmProductStatus" data-placeholder="Chọn lĩnh vực" tabindex="1" onchange="articleType.bindCategory(this);">
<?php
foreach ($productStatuses as $item) {
if ($item[global_mapping::StatusID] == $retailter[global_mapping::ProductStatusID]) {
echo ' <option selected="selected" value="' . $item[global_mapping::StatusID] . '" >' . $item[global_mapping::StatusName] . '</option>';