예제 #1
0
 public function reSearchIndexAction($i = 0)
 {
     set_time_limit(0);
     $count = 100;
     $items = Ecommerce\Item::getList(['start' => $i * $count, 'limit' => $count]);
     if (!$items) {
         Tools::redirect('/admin/ecommerce/configure', 'Поисковый индекс обновлен');
     } else {
         $i++;
         foreach ($items as $key => $item) {
             $item->save();
             unset($items[$key]);
             unset($item);
         }
         echo 'Происходит процесс индексации: проиндексировано ' . $i * $count;
         Tools::redirect('/admin/ecommerce/reSearchIndex/' . $i);
     }
 }
예제 #2
0
파일: Ecommerce.php 프로젝트: krvd/cms-Inji
 /**
  * Getting items with params
  * 
  * @param array $params
  * @return array
  */
 public function getItems($params = [])
 {
     $selectOptions = $this->parseOptions($params);
     $items = Ecommerce\Item::getList($selectOptions);
     return $items;
 }