本文整理匯總了PHP中osC_Product::getListingFeature方法的典型用法代碼示例。如果您正苦於以下問題:PHP osC_Product::getListingFeature方法的具體用法?PHP osC_Product::getListingFeature怎麽用?PHP osC_Product::getListingFeature使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類osC_Product
的用法示例。
在下文中一共展示了osC_Product::getListingFeature方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: buildProductsRss
function buildProductsRss($group)
{
global $osC_Language, $osC_Image;
$group_title = $group . '_products';
$rss = array();
$rss['rss'] = array();
$rss['rss attr'] = array('xmlns:atom' => 'http://www.w3.org/2005/Atom', 'version' => '2.0');
//channel
$rss['rss']['channel'] = array('title' => '<![CDATA[' . $osC_Language->get($group_title) . ']]>', 'link' => '<![CDATA[' . osc_href_link(FILENAME_PRODUCTS, $group) . ']]>', 'description' => '<![CDATA[' . $osC_Language->get($group_title) . ']]>', 'pubDate' => date("D, d M Y H:i:s O"));
//items
if ($group == "new") {
$Qproducts = osC_Product::getListingNew();
} else {
if ($group == 'special') {
$Qproducts = osC_Specials::getListing();
} else {
if ($group == 'feature') {
$Qproducts = osC_Product::getListingFeature();
}
}
}
$items = array();
while ($Qproducts->next()) {
$osC_Product = new osC_Product($Qproducts->valueInt('products_id'));
$link = osc_href_link(FILENAME_PRODUCTS, $Qproducts->valueInt('products_id'), 'NONSSL', false, false, true);
$description = '
<![CDATA[
<table>
<tr>
<td align="center" valign="top">' . osc_link_object($link, osc_image($osC_Image->getImageUrl($osC_Product->getImage(), 'product_info'), $osC_Product->getTitle())) . '</td>
<td valign="top">' . $osC_Product->getDescription() . '</td>
</tr>
</table>
]]>';
$items[] = array('title' => '<![CDATA[' . $osC_Product->getTitle() . ' -- ' . $osC_Product->getPriceFormated() . ']]>', 'link' => '<![CDATA[' . $link . ']]>', 'description' => $description, 'pubDate' => date("D, d M Y H:i:s O"));
}
$rss['rss']['channel']['item'] = $items;
return $rss;
}