function init()
 {
     parent::init();
     Requirements::themedCSS("ProductGroupAlternative");
 }
 function init()
 {
     parent::init();
     Requirements::themedCSS("PriceListPage", "ecommerce_complex_pricing");
 }
 function init()
 {
     parent::init();
     //  =======================
     //CURRENT SETTINGS
     //  =======================
     //ppp
     if (isset($_REQUEST[self::get_ppp_param()]) && $_REQUEST[self::get_ppp_param()]) {
         $this->productsPerPage = intval($_REQUEST[self::get_ppp_param()]);
     } else {
         $this->productsPerPage = $this->NumberOfProductsPerPage;
     }
     if (isset($_REQUEST["mydebug"])) {
         $this->mydebug = true;
     }
     //pos
     if (isset($_REQUEST[self::get_pos_param()])) {
         $this->productOffSet = intval($_REQUEST[self::get_pos_param()]);
     } else {
         $this->productOffSet = 0;
     }
     //category
     if (isset($_REQUEST[self::get_category_param()])) {
         $this->categoryID = intval($_REQUEST[self::get_category_param()]);
     } else {
         $this->categoryID = 0;
     }
     //merchant page
     if (isset($_REQUEST[self::get_merchant_page_param()])) {
         $this->merchantPageID = intval($_REQUEST[self::get_merchant_page_param()]);
     } else {
         $this->merchantPageID = 0;
     }
     //city
     if (isset($_REQUEST[self::get_city_param()])) {
         $this->cityID = intval($_REQUEST[self::get_city_param()]);
     } else {
         $this->cityID = 0;
     }
     //priceFrom
     if (isset($_REQUEST[self::get_price_from_param()])) {
         $this->priceFrom = intval($_REQUEST[self::get_price_from_param()]);
     } else {
         $this->priceFrom = 0;
     }
     //priceUpTo
     if (isset($_REQUEST[self::get_price_upto_param()])) {
         $this->priceUpTo = intval($_REQUEST[self::get_price_upto_param()]);
     } else {
         $this->priceUpTo = 0;
     }
     Requirements::javascript('ecommerce_merchants/javascript/filter.js');
 }
 function init()
 {
     parent::init();
     if (!$this->canFrontEndEdit()) {
         foreach (array('Locations', 'Products') as $function) {
             $pages = $this->{$function}();
             if ($pages) {
                 $page = $pages->First();
                 return Director::redirect($page->Link());
             }
         }
         $parent = $this->Parent();
         if ($parent && $parent->exists()) {
             return Director::redirect($parent->Link());
         }
         return Director::redirect('/');
     }
 }
 function init()
 {
     parent::init();
     $array = $this->resultArray();
     if (count($array) > 1) {
         $this->isSearchResults = true;
     }
 }
 function init()
 {
     parent::init();
     $array = $this->searchResultsArrayFromSession();
     if (count($array) > 1) {
         $this->isSearchResults = true;
     }
 }