Maybe i did not seted it ok, i did set it under the theme extra data, Is it ok or maybe advise.
Regards
Ghiz.
function mb_filter_extend() {
// THEME EXTRA DATA
Search::newInstance()->addJoinTable( DB_TABLE_PREFIX.'t_item_stela.fk_i_item_id', DB_TABLE_PREFIX.'t_item_stela', DB_TABLE_PREFIX.'t_item.pk_i_id = '.DB_TABLE_PREFIX.'t_item_stela.fk_i_item_id', 'LEFT OUTER' ) ; // Mod
if(function_exists('radius_item_loc')) {
Search::newInstance()->addJoinTable( DB_TABLE_PREFIX.'t_item_radius.item_id', DB_TABLE_PREFIX.'t_item_radius', DB_TABLE_PREFIX.'t_item.pk_i_id = '.DB_TABLE_PREFIX.'t_item_radius.item_id', 'LEFT OUTER' ) ;
$cd = ModelRadius::newInstance()->getCordByCity(Params::getParam('city'));
if(@$cd['latitude'] <> '' && @$cd['longitude'] <> '') {
$sql = sprintf('SQRT(POWER(%st_item_radius.longitude - %d, 2) + POWER(%st_item_radius.latitude - %d, 2))', DB_TABLE_PREFIX, @$cd['longitude'], DB_TABLE_PREFIX, @$cd['latitude']);
Search::newInstance()->order($sql . ' ASC, ' . DB_TABLE_PREFIX.'t_item.dt_pub_date DESC', '');
}
}