Integration and compatibility issue

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Integration and compatibility issue

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9550

    storeverona
    Participant

    Hi, I have a compatibility and integration problem on my website. I installed the plugin and set Ajax Search Pro to substitute the classif WP search.

    The form is working fine, but when you click on the magnifier (see the attached screenshot 01) and then you open the search box, you cannot close it anymore. I tried a lot of options but unsuccesfully. Do you have some suggestion? Thank you. Filippo

    Attachments:
    You must be logged in to view attached files.
    #9552

    Ernest Marcinko
    Keymaster

    Hi Filippo,

    It's because there are is a custom script executed related to the old header search and it throws an error breaking further execution – because the old search is not there anymore: https://i.imgur.com/y35ULiO.png
    The error is coming from the theme, I might still be able suggest a solution so you don't have to contact the theme author as well:

    1. Open up the /wp-content/themes/orion/js/custom.js file and srcoll to line 260, which should be this:

    jQuery('.headersearch .search-box input[type=text]').setCursor(0);

    2. Remove that line.

    This tries to focus the input field of the old search once it's opened, however it's no longer there so it encounters an error.
    Also, I have noticed that the search “opener” icon is positioned absolutely by default, covering the search bar. If I may suggest the following custom CSS to fix the search bar position:

    .asp_main_container {
        position: absolute;
        left: 60px;
        top: 5px;
    }
    Best,
    Ernest Marcinko

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


    #9553

    storeverona
    Participant

    Hi Ernest, thanks a lot for the precious support. Part of the issue is solved, but once I open the Ajax Search Pro box, I cannot close it anymore, I have no possibility to go back to the menu. I also tried to activate the “Close on magnifier click” but it's not working… any other suggestion? Thank you a lot. Filippo

    #9554

    Ernest Marcinko
    Keymaster

    Hi Filippo,

    You can turn off the “close on magnifier click” option, as it won't help in this case.

    From the theme code I can see that the closing of that search bar was attached to the event when the user clicked outside of the original search box. It no longer works, since the original search is not there anymore.
    I might have found a solution to that as well.

    1. Open up the same file as before, and scroll to line 277:

    jQuery('.headersearch .search-box input[type=text]').blur(function(e){

    2. Try replacing that line with:

    jQuery('body').click(function(e){

    I'm not sure how it will react, but it should trigger the closing event if the user clicks outside the search bar.

    Best,
    Ernest Marcinko

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


    #9555

    storeverona
    Participant

    Great, it's working! Thank you so much for the super fast support. Best. Filippo

    #9556

    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.