OS Property support center

Advance search - No. Bedrooms and No. Bathrooms

  • stavros
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 1 month ago #28719 by stavros
Hi guys,

How I can change the drop down list of advance search for both No. Bedrooms and No. Bathrooms? To show result the exact Number?
not 1+ or 2+ and so on.

Kind regards

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

More
11 years 1 month ago #28720 by Mr. Dam
Hi,
If you want to search extract the number of bedrooms, bathrooms, you need to modify the source code. If you want to change it, please follow these steps.
1. Open file components > com_osproperty > classes > listing.php
2. Find function advSearch line 637 (version 2.0.6.2)
3. Find this lines in that function
if ($nbed > 0) {$where .= " AND a.bed_room >= '$nbed'"; $no_search = false;}
if ($nbath > 0) {$where .= " AND a.bath_room >= '$nbath'"; $no_search = false;}
if ($nroom > 0) {$where .= " AND a.rooms >= '$nroom'"; $no_search = false;}
and change to
if ($nbed > 0) {$where .= " AND a.bed_room = '$nbed'"; $no_search = false;}
if ($nbath > 0) {$where .= " AND a.bath_room = '$nbath'"; $no_search = false;}
if ($nroom > 0) {$where .= " AND a.rooms = '$nroom'"; $no_search = false;}

Good luck
Dam

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

Moderators: Mr. DamNguyen Phu Quan