示例#1
0
 /**
  * @inheritdoc
  * @deprecated since 2.3, and will be removed in 2.4, please use ProductCategoryQuery::findByPosition
  */
 public function findByPosition($position)
 {
     return parent::findByPosition($position);
 }
 /**
  * Index all products
  */
 private function indexAllAction()
 {
     $products = ProductQuery::create()->findByVisible(1);
     $count = 0;
     foreach ($products as $product) {
         OpenSearchServerSearchHelper::indexProduct($product);
         $count++;
     }
     $this->getRequest()->getSession()->getFlashBag()->add('oss', $this->getTranslator()->trans('%count products have been indexed.', array('%count' => $count), OpenSearchServerSearch::MODULE_DOMAIN));
     return $this->redirectToHome();
 }
 /**
  * Index all products
  */
 private function indexAllAction()
 {
     $products = ProductQuery::create()->findByVisible(1);
     $count = 0;
     foreach ($products as $product) {
         OpenSearchServerSearchHelper::indexProduct($product);
         $count++;
     }
     $route = '/admin/module/OpenSearchServerSearch';
     $this->getRequest()->getSession()->getFlashBag()->add('oss', $this->getTranslator()->trans('%count products have been indexed.', array('%count' => $count), OpenSearchServerSearch::MODULE_DOMAIN));
     $this->redirect(URL::getInstance()->absoluteUrl($route));
 }