Open fredericalpers opened 2 months ago
@fredericalpers After investigating, I would like to suggest the following two solutions:
Solution 1:
Can you contact the IT department and request to add a parameter to the read estate API? This will allow us to pass the filter parameter with the following structure:
$filter['agentId'] []= ['op' => 'in', 'val' => array_unique($listContactPersonIds)];
In this case, $listContactPersonIds is taken from the estate details.
Solution 2: We attempted to implement a solution on the plugin side. However, this method requires calling the API twice: once to retrieve all estates and once to verify if the estate belongs to an agent. And this is my demo video: https://files.fm/f/qp7ubzg43a this pull request: https://github.com/onOffice-Web-Org/oo-wp-plugin/pull/896
Please check and let me know your opinion. Thanks! Note: Solution 2 is less optimal than solution 1 because in the second way, we need to call 1 more API => affecting performance.
@yeneastgate I will send a ticket to the IT Department. I will let you know what they say, thank you :)
Filter similar properties by linked real estate agent
User Story
The onOffice for WP-Websites plugin currently offers the function of displaying “similar properties” on the property detail page. These properties can be filtered based on certain criteria such as same property type, same marketing type, same zip code and radius. The maximum number of similar properties to be displayed can also be defined.
To further improve the relevance and quality of the properties displayed for end users, a new filter option is to be implemented. This makes it possible to filter the similar properties according to the linked address data record of the responsible estate agent. If this option is active, only properties belonging to the same agent will be displayed on the detail page.
This function improves the relevance of the similar properties displayed and contributes to the user experience by providing more targeted results.
Task / Requirements