Beispiel #1
0
 /**
  * doActionSearch
  *
  * @return void
  */
 protected function doActionSearchFeaturedProducts()
 {
     $sessionCell = \XLite\Module\CDev\FeaturedProducts\View\Admin\FeaturedProducts::getSessionCellName();
     $searchParams = \XLite\View\ItemsList\Model\Product\Admin\Search::getSearchParams();
     $productsSearch = array();
     $cBoxFields = array(\XLite\View\ItemsList\Model\Product\Admin\Search::PARAM_SEARCH_IN_SUBCATS);
     foreach ($searchParams as $modelParam => $requestParam) {
         if (isset(\XLite\Core\Request::getInstance()->{$requestParam})) {
             $productsSearch[$requestParam] = \XLite\Core\Request::getInstance()->{$requestParam};
         }
     }
     foreach ($cBoxFields as $requestParam) {
         $productsSearch[$requestParam] = isset(\XLite\Core\Request::getInstance()->{$requestParam}) ? 1 : 0;
     }
     \XLite\Core\Session::getInstance()->{$sessionCell} = $productsSearch;
 }
Beispiel #2
0
 /**
  * Get search conditions
  *
  * @return array
  */
 protected function getConditions()
 {
     $searchParams = \XLite\Core\Session::getInstance()->{\XLite\Module\CDev\FeaturedProducts\View\Admin\FeaturedProducts::getSessionCellName()};
     if (!is_array($searchParams)) {
         $searchParams = array();
     }
     return $searchParams;
 }