I have the same issue, BELOW is my code, can you please advise what exactly needs replaced?? thanks!!
function mb_filter_extend() {
// SEARCH - ALL - INDIVIDUAL - COMPANY TYPE
if(Params::getParam('sCompany') <> '' and Params::getParam('sCompany') <> null) {
Search::newInstance()->addJoinTable( 'pk_i_id', DB_TABLE_PREFIX.'t_user', DB_TABLE_PREFIX.'t_item.fk_i_user_id = '.DB_TABLE_PREFIX.'t_user.pk_i_id', 'LEFT OUTER' ) ; // Mod
if(Params::getParam('sCompany') == 1) {
Search::newInstance()->addConditions(sprintf("%st_user.b_company = 1", DB_TABLE_PREFIX));
} else {
Search::newInstance()->addConditions(sprintf("coalesce(%st_user.b_company, 0) <> 1", DB_TABLE_PREFIX, DB_TABLE_PREFIX));
}
}
Search::newInstance()->addJoinTable( 'pk_i_id', DB_TABLE_PREFIX.'t_item_veronika', DB_TABLE_PREFIX.'t_item.pk_i_id = '.DB_TABLE_PREFIX.'t_item_veronika.fk_i_item_id', 'LEFT OUTER' ) ; // Mod
// SEARCH - TRANSACTION
if(Params::getParam('sTransaction') <> '') {
Search::newInstance()->addConditions(sprintf("%st_item_veronika.i_transaction = %d", DB_TABLE_PREFIX, Params::getParam('sTransaction')));
}
// SEARCH - CONDITION
if(Params::getParam('sCondition') <> '') {
Search::newInstance()->addConditions(sprintf("%st_item_veronika.i_condition = %d", DB_TABLE_PREFIX, Params::getParam('sCondition')));
}
// SEARCH - PERIOD
if(Params::getParam('sPeriod') <> '') {
$date_from = date('Y-m-d', strtotime(' -' . Params::getParam('sPeriod') . ' day', time()));
Search::newInstance()->addConditions(sprintf('cast(%st_item.dt_pub_date as date) > "%s"', DB_TABLE_PREFIX, $date_from));
}
}
osc_add_hook('search_conditions', 'mb_filter_extend');