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!