Example #1
0
 /**
  * @return void
  */
 public function executeInternal()
 {
     try {
         $this->_catalogSearchAdvanced->addFilters($this->getRequest()->getQueryValue());
         $this->_view->loadLayout();
         $this->_view->renderLayout();
     } catch (\Magento\Framework\Exception\LocalizedException $e) {
         $this->messageManager->addError($e->getMessage());
         $defaultUrl = $this->_urlFactory->create()->addQueryParams($this->getRequest()->getQueryValue())->getUrl('*/*/');
         $this->getResponse()->setRedirect($this->_redirect->error($defaultUrl));
     }
 }
Example #2
0
 /**
  * Retrieve collection of product searchable attributes
  *
  * @return DbCollection
  */
 public function getSearchableAttributes()
 {
     $attributes = $this->_catalogSearchAdvanced->getAttributes();
     return $attributes;
 }