Fatal error: Call to undefined function dbRowsCount() in /var/www/ USER/data/www/SITE.RU/components/shop/psearch.php on line 40
в 40 строке следующий параметр
//include item to search results
if (!dbRowsCount('cms_search', "session_id='".session_id()."' AND link='$link'")){
$sql = "INSERT INTO cms_search (`id`, `session_id`, `title`, `link`, `place`, `placelink`)
VALUES ('', '".session_id()."', '".$item['title']."', '$link', '$place', '$placelink')";
$inDB->query($sql);
}
}
}
$query = str_replace('+', '', $query);
$query = str_replace(' ', '', $query);
$query = str_replace('*', '%', $query);
поиск по статьям каталогу и прочим компонентам без ошибок.
Заменить содержимое psearch.php на это
неужели нет никого кто подскажет?
<?php function search_shop($query, $look){ $inDB = cmsDatabase::getInstance(); $searchModel = cms_model_search::initModel(); global $_LANG; // выполняем поисковый запрос $sql = "SELECT DISTINCT con.*, cat.title cat_title, cat.seolink as cat_seolink FROM cms_shop_items con, cms_shop_cats cat WHERE MATCH(con.title, con.shortdesc, con.description) AGAINST ('$query' IN BOOLEAN MODE) AND con.category_id = cat.id AND con.published=1"; $result = $inDB->query($sql); if(!$inDB->num_rows($result)) { return; } if(cmsCore::loadModel('search')){ $searchModel = cms_model_search::initModel(); while($item = $inDB->fetch_assoc($result)){ $result_array['link'] = "/shop/".$item['seolink'].".html"; $result_array['place'] = $_LANG['SHOP'].' → '.$item['cat_title']; $result_array['placelink'] = "/shop/".$item['cat_seolink']; $result_array['description'] = $searchModel->getProposalWithSearchWord($item['description']); $result_array['title'] = $item['title']; $result_array['imageurl'] = (file_exists(PATH.'/images/photos/small/shop'.$item['id'].'.jpg') ? '/images/photos/small/shop'.$item['id'].'.jpg' : ''); $searchModel->addResult($result_array); } } return; } ?>