21286 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 905 Views |
-
Advanced Search on Ecommerce module

3 September 2010 at 11:44am
Hey, folks,
I wonder is there a way that we could decorate the generic Search function to apply search onto ecommerce module.
For instance, could search by Category, Artist, and even additonal fields that developer cutomized in their product.php.
Any suggestions or ideas for achieving that?!
Thanks in advanced. -
Re: Advanced Search on Ecommerce module

5 February 2011 at 12:17am
I'm wondering that too.
I want to search the product InternalItemID (productcode)SS 2.3.4
mysite > page.php/**
* Site search form
*/
function SearchForm() {
$searchText = isset($_REQUEST['Search']) ? $_REQUEST['Search'] : 'Search';
$fields = new FieldSet(
new TextField("Search", "", $searchText)
);
$actions = new FieldSet(
new FormAction('results', 'Search')
);return new SearchForm($this, "SearchForm", $fields, $actions);
}
/**
* Process and render search results
*/
function results($data, $form){
$data = array(
'Results' => $form->getResults(),
'Query' => $form->getSearchQuery(),
'Title' => 'Search Results'
);return $this->customise($data)->renderWith(array('Page_results', 'Page'));
}
| 905 Views | ||
|
Page:
1
|
Go to Top |


