Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Process and render search results.
- *
- * @param array $data The raw request data submitted by user
- * @param SearchForm $form The form instance that was submitted
- * @param SS_HTTPRequest $request Request generated for this action
- */
- public function results($data, $form, $request) {
- $products = Product::get()->filterAny(array(
- 'Title:PartialMatch' => $form->getSearchQuery(),
- 'SKUCode:PartialMatch' => $form->getSearchQuery()
- ));
- $data = array(
- 'Results' => $products,
- 'Query' => $form->getSearchQuery(),
- 'Title' => _t('SearchForm.SearchResults', 'Search Results')
- );
- return $this->owner->customise($data)->renderWith(array('Page_results', 'Page'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement