本文整理汇总了PHP中osC_Product::getModel方法的典型用法代码示例。如果您正苦于以下问题:PHP osC_Product::getModel方法的具体用法?PHP osC_Product::getModel怎么用?PHP osC_Product::getModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osC_Product
的用法示例。
在下文中一共展示了osC_Product::getModel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
function osC_Products_Images()
{
global $osC_Session, $osC_Language, $osC_Product;
if (empty($_GET) === false) {
$id = false;
$counter = 0;
foreach ($_GET as $key => $value) {
$counter++;
if ($counter < 2) {
continue;
}
if ((preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $key) || preg_match('/^[a-zA-Z0-9 -_]*$/', $key)) && $key != $osC_Session->getName()) {
$id = $key;
}
break;
}
if ($id !== false && osC_Product::checkEntry($id)) {
$osC_Product = new osC_Product($id);
$this->addPageTags('keywords', $osC_Product->getTitle());
$this->addPageTags('keywords', $osC_Product->getModel());
if ($osC_Product->hasTags()) {
$this->addPageTags('keywords', $osC_Product->getTags());
}
$this->_page_title = $osC_Product->getTitle();
} else {
$this->_page_title = $osC_Language->get('product_not_found_heading');
$this->_page_contents = 'info_not_found.php';
}
} else {
$this->_page_title = $osC_Language->get('product_not_found_heading');
$this->_page_contents = 'info_not_found.php';
}
}
示例2: foreach
function osC_Products_Products()
{
global $osC_Database, $osC_Services, $osC_Session, $osC_Language, $osC_Breadcrumb, $osC_Product;
if (empty($_GET) === false) {
$id = false;
// PHP < 5.0.2; array_slice() does not preserve keys and will not work with numerical key values, so foreach() is used
foreach ($_GET as $key => $value) {
if ((preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $key) || preg_match('/^[a-zA-Z0-9 -_]*$/', $key)) && $key != $osC_Session->getName()) {
$id = $key;
}
break;
}
if ($id !== false && osC_Product::checkEntry($id)) {
$osC_Product = new osC_Product($id);
$osC_Product->incrementCounter();
$this->addPageTags('keywords', $osC_Product->getTitle());
$this->addPageTags('keywords', $osC_Product->getModel());
if ($osC_Product->hasTags()) {
$this->addPageTags('keywords', $osC_Product->getTags());
}
$this->addJavascriptFilename('templates/' . $this->getCode() . '/javascript/' . $this->_group . '/info.js');
osC_Services_category_path::process($osC_Product->getCategoryID());
if ($osC_Services->isStarted('breadcrumb')) {
$osC_Breadcrumb->add($osC_Product->getTitle(), osc_href_link(FILENAME_PRODUCTS, $osC_Product->getKeyword()));
}
$this->_page_title = $osC_Product->getTitle();
} else {
$this->_page_title = $osC_Language->get('product_not_found_heading');
$this->_page_contents = 'info_not_found.php';
}
} else {
$this->_page_title = $osC_Language->get('product_not_found_heading');
$this->_page_contents = 'info_not_found.php';
}
}
示例3: while
?>
</tr>
<?php
$rows = 0;
while ($Qlisting->next()) {
$osC_Product = new osC_Product($Qlisting->valueInt('products_id'));
$rows++;
echo ' <tr class="' . ($rows / 2 == floor($rows / 2) ? 'productListing-even' : 'productListing-odd') . '">' . "\n";
for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) {
$lc_align = '';
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_align = '';
$lc_text = ' ' . $osC_Product->getModel() . ' ';
break;
case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($_GET['manufacturers'])) {
$lc_text = osc_link_object(osc_href_link(FILENAME_PRODUCTS, $osC_Product->getKeyword() . '&manufacturers=' . $_GET['manufacturers']), $osC_Product->getTitle());
} else {
$lc_text = ' ' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $osC_Product->getKeyword() . ($cPath ? '&cPath=' . $cPath : '')), $osC_Product->getTitle()) . ' ';
}
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = ' ';
if ($osC_Product->hasManufacturer()) {
$lc_text = ' ' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $osC_Product->getManufacturerID()), $osC_Product->getManufacturer()) . ' ';
}