This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Search Functionality Based on Merchant Locations and Nearby Areas

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search Functionality Based on Merchant Locations and Nearby Areas

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #53906
    nikpapan_VBIMnikpapan_VBIM
    Participant

    Hello.

    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

    #53910
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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?

    #53926
    nikpapan_VBIMnikpapan_VBIM
    Participant

    You cannot access this content.

    #53927
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I 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.

    #53928
    nikpapan_VBIMnikpapan_VBIM
    Participant

    I 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.

    #53937
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Oh 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/

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.