Page 1 of 1

Default Filter unless searching

Posted: 2014-02-11 18:32
by HBmike
Hello,

I am trying to set up a hook to implement a filter to not show the closed orders unless someone is doing a search. I have tried various variations but it is not working. Basically checking to see if there is a search string then it will not add the filter. Here is what I have so far;

Code: Select all


                function orders_init(&$options, $memberInfo, &$args){

/* My code starts here */
if (empty($_POST['SearchString'])) {
addFilter(1, 'or', 5, '!=', 'Closed');
} 
/* My code ends */
		return TRUE;
	}



Thanks for any ideas!

Re: Default Filter unless searching

Posted: 2014-02-18 15:43
by HBmike
Still trying to figure this out. Any ideas?

Thanks!