Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. /**
  2.      * Process and render search results.
  3.      *
  4.      * @param array $data The raw request data submitted by user
  5.      * @param SearchForm $form The form instance that was submitted
  6.      * @param SS_HTTPRequest $request Request generated for this action
  7.      */
  8.     public function results($data, $form, $request) {
  9.  
  10.         $products = Product::get()->filterAny(array(
  11.             'Title:PartialMatch' => $form->getSearchQuery(),
  12.             'SKUCode:PartialMatch' => $form->getSearchQuery()
  13.         ));
  14.  
  15.         $data = array(
  16.             'Results' => $products,
  17.             'Query' => $form->getSearchQuery(),
  18.             'Title' => _t('SearchForm.SearchResults', 'Search Results')
  19.         );
  20.         return $this->owner->customise($data)->renderWith(array('Page_results', 'Page'));
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement