Search Result

This topic contains 6 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 8 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6647
    Chris Thoo
    Chris Thoo
    Participant

    Hi, this is a perfect plugin for my website.

    As you can see, this is an online directory website that I’ve put up & it comes with a ready made search feature. But I find having 3 separate text boxes too many & bulky.

    I’m trying to achieve something like http://www.glassesonline.com.my/ where there is only one single search box. I’ve added yours below the existing one.
    http://trova.com.my/web/

    Questions:
    1. Can I disable the drop down search result? I read somewhere in the comments that it requires hardcoding. I know some programming myself so if you can guide me on which file I can amend the codes, it’ll be fine.

    2. Next, the search result page for your search form & the existing search form is different.
    Can I set the result page to use back the one that is existing? I know there may be codings involved. Can you guide me?

    Thank you so much

    #6649
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    1. If I get correctly, you want to completely disable the ajax results. No coding is required πŸ™‚
    Configure the General Options -> Behavior panel as following: https://i.imgur.com/r5ATjnW.png

    The search won’t activate when typing, and will redirect to the results page when hitting enter or the search icon.

    2. I’m not sure if that is possible, but I guess we can try. I’ve examined the current form, and it redirects to a custom results page, not to the default one.

    Form redirection: http://trova.com.my/web/?field_c7a95a576f13bbb32f0a479d41c2ae58=test&s=&serialized=1&action=pfs
    Default search: http://trova.com.my/web/?s=test

    But, there is an option in Ajax Search Pro that might work without coding. On the same options panel (General Options -> Behavior) there is an option: Redirect to url? The default value is: ?s={phrase}

    Based on the url above, change the value to: ?field_c7a95a576f13bbb32f0a479d41c2ae58={phrase}&s=&serialized=1&action=pfs

    Screenshot: https://i.imgur.com/jnPUJZy.png

    Let me know if that works!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6650
    Chris Thoo
    Chris Thoo
    Participant

    YESSSSSS….oh gosh…Ernest, you’re really a lifesaver!!!!!!!!!!!
    you’re amazing!

    #6651
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You are welcome πŸ™‚

    You can find how to add the search shortcode to your theme here: https://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/getting_started/search_shortcode_in_themes.html

    It’s the php shortcode you are looking for. On the search settings page you click on “Toggle shortcodes for…” and the PHP theme shortcode will appear: https://i.imgur.com/tMRextS.png

    If you like plugin, you can rate it on your codecanyon downloads page if you want to πŸ™‚

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6652
    Chris Thoo
    Chris Thoo
    Participant

    Yes, found it!
    Thank you so much. πŸ™‚ I will rate this awesome. Some developers are not really so friendly you know. Thank you.

    #6663
    Chris Thoo
    Chris Thoo
    Participant

    Hi Ernest,

    The username & password is still the same.
    There’s one more thing I would like to seek for your advice.

    http://trova.com.my/web/

    As you can see, if I do a search for “Optical”, it will return the results which is fine.
    Btw “Optical” is the name of the Optical outlets.
    I can also see from the result page, on the right side (The original search widget for this theme) would have “Optical” displayed in the box for Outlet name.

    So all is good. But when I use your search box to search for “Selangor”, which is the location (Field type is ListingType), no result is found. This makes sense because it is searching for “Selangor” in the box for Outlet Name.

    Is there any way I can have your search to search for all 3 types? (Outlet Name, Brands, Locations)

    Many thanks. I can think of no other stuff to amend other than this. I really think that this script is good!

    #6669
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I think I understand what you need, but I think I can’t do anything about it. Let me explain why:

    Currenly the plugin is redirecting to this specialized results list, which we discussed before, by editing the url to:

    ?field_c7a95a576f13bbb32f0a479d41c2ae58={phrase}&s=&serialized=1&action=pfs

    Because of this custom redirection, the plugin search engine is not used. The reason is, that this redirection uses most likely a custom search engine specialized in searching for these shops, and it’s very different from the built in WordPress default search engine. The ajax search pro, can only override the default WordPress search engine, because it’s coded that way. But because this default engine is not used in your case, ajax search pro cannot override it.
    Basically what happens now is this:

    • User types in the search query, hits enter button
    • Ajax Search Pro gets the request, and by configuration it redirects to the url given
    • The corresponding theme code recognizes this URL and starts it’s own search
    • After searching the theme displays the results on this specail results page

    So in this case ajax search pro is only a mediator to the theme search engine.

    The only possible way to look for those fields is to change the configuration or the code of the acting theme search, that displays that special results page. I hope you understand πŸ™‚

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.