- Posts: 46
- Thank you received: 0
OS Property support center
Location / Keywords Search Box
- jeffrey
- Topic Author
- Offline
- Senior Member
-
Less
More
9 years 11 months ago #63936
by jeffrey
Location / Keywords Search Box was created by jeffrey
Hi, May i know how to set the Location / Keywords in search box is only match to title and location of the Advertisement put in by agent / owner?
Currently i facing the problems if i keyed-in some keywords in the search box. All the keywords in title, location and description match to the keywords i searching will be appear on my search results. (Please see the attachment for screen snap shoot)
I wish to switch "OFF" the search results is match to description, and made it "ON" only to the keywords is match with Title, Location information only.
Best Regards,
Jeffrey
Currently i facing the problems if i keyed-in some keywords in the search box. All the keywords in title, location and description match to the keywords i searching will be appear on my search results. (Please see the attachment for screen snap shoot)
I wish to switch "OFF" the search results is match to description, and made it "ON" only to the keywords is match with Title, Location information only.
Best Regards,
Jeffrey
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13056
- Thank you received: 1696
9 years 11 months ago #63944
by Mr. Dam
Replied by Mr. Dam on topic Location / Keywords Search Box
Hi Jeffrey,
You can modify the Advanced search function of OS Property at file:
and change to
Good luck
Dam
You can modify the Advanced search function of OS Property at file:
Findcomponents > com_osproperty > classes > listing.php
Code:
if($address != ""){
$address = str_replace(";","",$address);
if(strpos($address,",")){
$addressArr = explode(",",$address);
if(count($addressArr) > 0){
$where .= " AND (";
foreach ($addressArr as $address_item){
$where .= " a.ref like '%$address_item%' OR";
$where .= " a.pro_name$lang_suffix like '%$address_item%' OR";
$where .= " a.address like '%$address_item%' OR";
$where .= " a.region like '%$address_item%' OR";
$where .= " a.postcode like '%$address_item%' OR";
$where .= " g.state_name$lang_suffix like '%$address_item%' OR";
$where .= " h.city$lang_suffix like '%$address_item%' OR";
}
$where = substr($where,0,strlen($where)-2);
$where .= " )";
}
}else{
$where .= " AND (";
$where .= " a.ref like '%$address%' OR";
$where .= " a.pro_name$lang_suffix like '%$address%' OR";
$where .= " a.address like '%$address%' OR";
$where .= " a.region like '%$address%' OR";
$where .= " g.state_name$lang_suffix like '%$address%' OR";
$where .= " h.city$lang_suffix like '%$address%' OR";
$where .= " a.postcode like '%$address%'";
$where .= " )";
}
$no_search = false;
}
and change to
Code:
if($address != ""){
$where .= " AND (";
$where .= " a.ref like '%$address%' OR";
$where .= " a.pro_name$lang_suffix like '%$address%' OR";
$where .= " a.address like '%$address%' OR";
$where .= " a.region like '%$address%' OR";
$where .= " g.state_name$lang_suffix like '%$address%' OR";
$where .= " h.city$lang_suffix like '%$address%' OR";
$where .= " a.postcode like '%$address%'";
$where .= " )";
$no_search = false;
}
Good luck
Dam
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.