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())); } }
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; }
#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')) { ?>
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; }
#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();