onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Selection of redirection in the searchform.php to the target page #932

Open fredericalpers opened 1 month ago

fredericalpers commented 1 month ago

Selection of redirection in the searchform.php to the target page

User Story

As an administrator or developer of a property website, I want to add a dropdown element in the settings page for the searchform.php that allows me to select a target page for search results. The selected page should automatically populate the form action attribute, so users are redirected to the correct property listing or results page without requiring manual code changes.

Task/Requirements

260985869-6c8e5d37-e71f-40cb-9fdc-408f59e46b23

260985891-adfc175f-7c6d-4d9a-804a-52a48de31225

yeneastgate commented 1 month ago

@fredericalpers I see there's an old issue I've already investigated (see issue https://github.com/onOffice-Web-Org/oo-wp-plugin/issues/613). Is this issue similar to that one?

fredericalpers commented 1 month ago

@yeneastgate you are right. the only difference is that this Issue here is "Step 1" without further additional changes to the behaviour besides the implementation of the forwarding. I will close the other issue, thank you :)

yeneastgate commented 1 month ago

@fredericalpers I have a few points I need to confirm with you:

  1. In the "Select page" dropdown menu, will the list display "pages using shortcode" from the ListView?

  2. When a user submits a search query on the frontend, they will be redirected to the "selected page" in the admin panel, including the searched parameters in the search form and displaying the corresponding estate search results.

  3. If the search form includes a "city" field but the selected page does not have a "city" field, the search should still function correctly based on the "city" field, even if the results are not shown in the estate information.

  4. When searching in the search form, will the filters in "Filters & Records" depend on the Forwarding page? Because currently, if the "Filters & Records" of the search form and the "Filters & Records" of the Forwarding page are different, it will produce different results when searching. image

fredericalpers commented 1 month ago

@yeneastgate

In the "Select page" dropdown menu, will the list display "pages using shortcode" from the ListView?

We want to keep it simple and display all created pages.

When a user submits a search query on the frontend, they will be redirected to the "selected page" in the admin panel, including the searched parameters in the search form and displaying the corresponding estate search results. If the search form includes a "city" field but the selected page does not have a "city" field, the search should still function correctly based on the "city" field, even if the results are not shown in the estate information.

Correct, however the customer has to mark the fields as filterable/show in search on the searchform and the propertylist themselves. if the city field is not made filterable the search does not have to work with these fields.

When searching in the search form, will the filters in "Filters & Records" depend on the Forwarding page? Because currently, if the "Filters & Records" of the search form and the "Filters & Records" of the Forwarding page are different, it will produce different results when searching.

Thats okay, since the customer has to make sure the searchform and the corresponding property lists are set up properly.

We simply want to give the customer the possibility to set up the forwarding with the form action without having to have coding knowledge and having to customize the templates.

yeneastgate commented 1 month ago

We want to keep it simple and display all created pages.

@fredericalpers If it's the pages that have been created, will it display both the pages with the shortcode address and the form, right?

yeneastgate commented 1 month ago

image

@fredericalpers Could you send me the link to the documentation so I can add it?

fredericalpers commented 1 month ago

@yeneastgate this is our current documentation: https://wp-plugin.onoffice.com/de/

yeneastgate commented 1 month ago

@fredericalpers Please take a look at my demo video and let me know your opinions. Thank you!

https://github.com/user-attachments/assets/c9e4e3ae-36f7-4dc3-a875-3a49c3e13b7e

fredericalpers commented 1 month ago

Seems good to me! I will review this as soon as possible! :) Thank you