Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search Functionality Based on Merchant Locations and Nearby Areas
- This topic has 5 replies, 2 voices, and was last updated 1 year ago by
Ernest Marcinko.
-
AuthorPosts
-
May 5, 2025 at 11:04 am #53906
nikpapan_VBIM
ParticipantHello.
To begin with, the search URL is: https://goldmall.ezlink.gr/easy-search-test.
We are implementing a frontend search functionality based on a custom field called “primary_locations_merchant”, which represents the location assigned to each merchant.
Our objective is to enhance the user experience by displaying search results not only from the selected merchant area but also from nearby or related areas.
To achieve this, we have created two custom post types: “Locations” and “Neighboring Areas”. We have modified the default search query to return products associated with both the selected location (e.g., Άνω Τούμπα) and its neighboring areas (e.g., Κάτω Τούμπα), where such relationships exist.
As an example, the above URL displays results from both Άνω Τούμπα and Κάτω Τούμπα, even though the user has explicitly selected Άνω Τούμπα only.
Additionally, we would like to adjust the layout of the field labeled “Επίλεξε Πόλη/Περιοχή:” as presented on the page. If there are options or recommendations available within the plugin for customizing this field’s appearance or structure, we would be glad to hear them.
Please find attached a few screenshots illustrating the current behavior and layout.
We would appreciate it if you could let us know whether your plugin provides any built-in functionality to support this behavior or any suggestions on how to override the query and layout to achieve the desired result.
Thank you in advance for your assistance.
Best regards
May 5, 2025 at 2:25 pm #53910Ernest Marcinko
KeymasterHi,
Thanks for the details, it helps a lot! Unfortunately the screenshots didn’t come throught for some reason so I can only guess for now.
I tried the search as you suggested, selected “Άνω Τούμπα” as the filter value, and I get these results: https://i.imgur.com/HVBxtXo.png
I suspect the filter operator was set to the default “LIKE” instead of the “EXACTLY LIKE”, but now it seems to be all right.About the layout, what exactly do you need to change?
May 6, 2025 at 10:24 am #53926nikpapan_VBIM
ParticipantYou cannot access this content.
May 6, 2025 at 10:28 am #53927Ernest Marcinko
KeymasterI see!
In the URL provided: https://goldmall.ezlink.gr/prosfores?merchant_location=247156&category=40
..not Ajax Search Pro is used, but a different search engine. You may have to contact their developer about the issue.May 6, 2025 at 10:39 am #53928nikpapan_VBIM
ParticipantI have developed this logic myself, and I am currently using it as a demonstration of the ideal behavior we would like to achieve using Ajax Search Pro.
Please note that the provided URL does not represent a true search engine—it is a filtering mechanism where we have programmatically overridden the query results.With that in mind, is there any possibility that Ajax Search Pro could support similar functionality? Alternatively, would you be able to suggest the best approach to overriding the plugin’s query logic to return results based on both the selected location and its neighboring areas?
Please let me know if any additional clarification is needed.
May 8, 2025 at 2:26 pm #53937Ernest Marcinko
KeymasterOh I see.
Well, you can enable this option, then the search URL will update to the borwser URL bar. That way if you copy that URL, the search settings are preset to those values, if that’s what you are looking for.
Similarly to this example: https://ajaxsearchpro.com/shop-search/ -
AuthorPosts
- You must be logged in to reply to this topic.