OS Property support center

So the idea is to be able to select multiple locations at the same time

  • sergey
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 1 week ago #160774 by sergey
So the idea is to be able to select multiple locations at the same time, it's like you go to 1 city, but you want to select only parts of that city

We can do with extrafields actually, but we need to change 1 thing about it, we need to change OR to AND - so it shows property if even 1 is selected
Can you help me make it work? 
Right now it does not 

 in \com_osproperty\classes\listing.php there is static function advSearch($option){  right, and inside of it I found a code for extra fields, BUT I want to make it in such a way that if the property has at least one of the extrafields selected in search module - then I will show it in the search query - so I want to change AND for OR in it, and I did - BUT - nothing changed, I searched all the codes but there is no other search query fo the extra fields with AND in it, can you please guide me what to look for? 

And here is the code we had before and how I changed it:
FROM:
    if((isset($extrafieldSql)) AND (count($extrafieldSql)) > 0){
                $extrafieldSql = implode(" AND ",$extrafieldSql);
                if(trim($extrafieldSql) != ""){
                    $where .= " AND ".$extrafieldSql;
                }
            }

TO:
    if((isset($extrafieldSql)) AND (count($extrafieldSql)) > 0){
                $extrafieldSql = implode(" OR ",$extrafieldSql);
                if(trim($extrafieldSql) != ""){
                    $where .= " AND ".$extrafieldSql;
                }
            }

Ideally I would want to add extrafield2 that is separate and to make it work with cities - so depending on the city - we will see different fields and if any of the selected fields are in property - then that property will be added in search results

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

More
7 months 1 week ago #160874 by Mr. Dam
Hi Sergey,
Actually, it's not simple to search through multiple locations. But i will consider to find solution to implement it in future.
Thanks
Dam

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

  • sergey
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 months 1 day ago #164937 by sergey
It's ok, The other method is to duplicate categories - as you already have multiple choices for them - and we could just use them as locations. I am willing to pay for any solution pls let me know if you can provide one and how much it will cost

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

More
2 months 17 hours ago #164951 by Mr. Dam
Hi Sergey,
Of course, the best solution is customize the search function of OS Property to allow users to search through multiple location. It's difficult but if you want, we can discuss about the work. Please submit ticket on category OS Property and we will talk about this project.
Thanks
Dam

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

Moderators: Mr. DamNguyen Phu Quan