本文整理汇总了PHP中osCommerce\OM\Core\OSCOM::getDefaultSite方法的典型用法代码示例。如果您正苦于以下问题:PHP OSCOM::getDefaultSite方法的具体用法?PHP OSCOM::getDefaultSite怎么用?PHP OSCOM::getDefaultSite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\OSCOM
的用法示例。
在下文中一共展示了OSCOM::getDefaultSite方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public static function execute(ApplicationAbstract $application)
{
$OSCOM_Service = Registry::get('Service');
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$application->setPageTitle(sprintf(OSCOM::getDef('index_heading'), STORE_NAME));
$application->setPageContent('product_listing.php');
if (is_numeric($_GET['Manufacturers'])) {
Registry::set('Manufacturer', new Manufacturer($_GET['Manufacturers']));
$OSCOM_Manufacturer = Registry::get('Manufacturer');
$application->setPageTitle($OSCOM_Manufacturer->getTitle());
// HPDL $application->setPageImage('manufacturers/' . $OSCOM_Manufacturer->getImage());
if ($OSCOM_Service->isStarted('Breadcrumb')) {
$OSCOM_Breadcrumb->add($OSCOM_Manufacturer->getTitle(), OSCOM::getLink());
}
Registry::set('Products', new Products());
$OSCOM_Products = Registry::get('Products');
$OSCOM_Products->setManufacturer($OSCOM_Manufacturer->getID());
if (isset($_GET['filter']) && is_numeric($_GET['filter']) && $_GET['filter'] > 0) {
$OSCOM_Products->setCategory($_GET['filter']);
}
if (isset($_GET['sort']) && !empty($_GET['sort'])) {
if (strpos($_GET['sort'], '|d') !== false) {
$OSCOM_Products->setSortBy(substr($_GET['sort'], 0, -2), '-');
} else {
$OSCOM_Products->setSortBy($_GET['sort']);
}
}
} else {
osc_redirect(OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()));
}
}
示例2: start
public static function start()
{
Registry::set('Breadcrumb', new BreadcrumbClass());
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_top'), OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()));
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_shop'), OSCOM::getLink('Shop', 'Index'));
return true;
}
示例3:
#pageColumnLeft {
width: 16%;
}
//--></style>
<?php
}
unset($content_left);
unset($content_right);
if ($OSCOM_Template->hasPageHeader()) {
?>
<div id="pageHeader">
<?php
echo osc_link_object(OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()), osc_image(DIR_WS_IMAGES . 'store_logo.jpg', STORE_NAME), 'id="siteLogo"');
?>
<ul id="navigationIcons">
<?php
echo '<li>' . osc_link_object(OSCOM::getLink(null, 'Account', null, 'SSL'), osc_image(DIR_WS_IMAGES . 'header_account.gif', OSCOM::getDef('my_account'))) . '</li>' . '<li>' . osc_link_object(OSCOM::getLink(null, 'Cart'), osc_image(DIR_WS_IMAGES . 'header_cart.gif', OSCOM::getDef('cart_contents'))) . '</li>' . '<li>' . osc_link_object(OSCOM::getLink(null, 'Checkout', null, 'SSL'), osc_image(DIR_WS_IMAGES . 'header_checkout.gif', OSCOM::getDef('checkout'))) . '</li>';
?>
</ul>
<div id="navigationBar">
<?php
if ($OSCOM_Service->isStarted('Breadcrumb')) {
?>
示例4: redirect
public static function redirect($url)
{
if (strpos($url, "\n") !== false || strpos($url, "\r") !== false) {
$url = static::getLink(OSCOM::getDefaultSite());
}
if (strpos($url, '&') !== false) {
$url = str_replace('&', '&', $url);
}
header('Location: ' . $url);
exit;
}
示例5:
#pageColumnLeft {
width: 16%;
}
//--></style>
<?php
}
unset($content_left);
unset($content_right);
if ($OSCOM_Template->hasPageHeader()) {
?>
<div id="pageHeader">
<?php
echo HTML::link(OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()), HTML::image(OSCOM::getPublicSiteLink('images/store_logo.png'), STORE_NAME), 'id="siteLogo"');
?>
<div id="navigationIcons">
<?php
echo HTML::button(array('title' => OSCOM::getDef('cart_contents') . ($OSCOM_ShoppingCart->numberOfItems() > 0 ? ' (' . $OSCOM_ShoppingCart->numberOfItems() . ')' : ''), 'icon' => 'cart', 'href' => OSCOM::getLink(null, 'Cart'))) . HTML::button(array('title' => OSCOM::getDef('checkout'), 'icon' => 'triangle-1-e', 'href' => OSCOM::getLink(null, 'Checkout', null, 'SSL'))) . HTML::button(array('title' => OSCOM::getDef('my_account'), 'icon' => 'person', 'href' => OSCOM::getLink(null, 'Account', null, 'SSL')));
if ($OSCOM_Customer->isLoggedOn()) {
echo HTML::button(array('title' => OSCOM::getDef('sign_out'), 'href' => OSCOM::getLink(null, 'Account', 'LogOff', 'SSL')));
}
?>
</div>
<script type="text/javascript">
$('#navigationIcons').buttonset();