OS Property support center

How to make Ajax Search - "Search by Listing ID"

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 6 months ago #38051 by kalesh.suby
Hi Dam,

Please see attached image.

I want to have a "Search by property ID" feature.

Each property will use its property ID and people should be able to search by "property ID".

I made a copy of the "Ajax search " module but I dont know how to modify it to make it a search by ID module.

Thanks
Attachments:

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #38061 by Mr. Dam
If you want the ajax search module to search through ID of properties, please follow these steps:
open file
components > com_osproperty > classes > listing.php
find
if($search_name == 1){
$query1[] = " a.pro_name like '%$keyword%'";
$query1[] = " a.ref like '%$keyword%'";
}
change it to
if($search_name == 1){
$query1[] = " a.id = '$keyword'";
$query1[] = " a.pro_name like '%$keyword%'";
$query1[] = " a.ref like '%$keyword%'";
}

Dam

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan