Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter similar properties by linked real estate agent #885

Open
4 tasks done
fredericalpers opened this issue Aug 26, 2024 · 2 comments · May be fixed by #896
Open
4 tasks done

Filter similar properties by linked real estate agent #885

fredericalpers opened this issue Aug 26, 2024 · 2 comments · May be fixed by #896
Assignees
Labels
blocked Blocked due to external factors component: address list Issue, Pull Request or Discussion related to address lists feature New feature

Comments

@fredericalpers
Copy link
Member

fredericalpers commented Aug 26, 2024

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

  • A new checkbox should be added under “Similar properties” to activate the filter by estate agent.
  • Label: “Only show properties from the same estate agent”
  • If this checkbox is activated, only similar properties from the same estate agent will be displayed on the details page. The other filter criteria are still applied, but only to the properties of the same estate agent.
  • It should be tested how the filter works in combination with different active filters to ensure that the results are correct and as expected.
@fredericalpers fredericalpers added feature New feature component: address list Issue, Pull Request or Discussion related to address lists labels Aug 26, 2024
@fredericalpers fredericalpers added this to the v5.7 milestone Aug 26, 2024
@yeneastgate yeneastgate self-assigned this Sep 10, 2024
@yeneastgate
Copy link
Contributor

yeneastgate commented Sep 10, 2024

@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: #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.

@fredericalpers
Copy link
Member Author

@yeneastgate I will send a ticket to the IT Department. I will let you know what they say, thank you :)

@fredericalpers fredericalpers added the blocked Blocked due to external factors label Sep 16, 2024
@fredericalpers fredericalpers removed this from the v5.7 milestone Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked due to external factors component: address list Issue, Pull Request or Discussion related to address lists feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants