Trigger and redirection behavior / Custom URL > GET instead of POST

Home Forums Bug reporting, Questions & Suggestions Ajax Search Pro for WordPress Trigger and redirection behavior / Custom URL > GET instead of POST

This topic contains 3 replies, has 2 voices, and was last updated by

 
Participant
1 month, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35251

    Participant

    Hello Enerest,

    Thank you for the last big update, the relevance is much better when there is apostrophe in keywords ! 🙂

    But since then I have a annoying problem.
    You will find attach my “Trigger and redirection behavior” settings.
    Now when I click the manifier icon or when i press the return button, i’m going to my custom url but with a POST request. I would like to have a GET request like before.

    Can you tell me where in the code I can patch that if it’s not possible for the moment on the admin ?

    Thank you very much,

    Manu

    • This topic was modified 1 month, 1 week ago by  Manu.
    Attachments:
    You must be logged in to view attached files.
    #35255

    Participant

    I saw jquery.ajaxsearchpro.js

    } else {
                    // The method is not important, just send the data to memorize settings
                    asp_submit_to_url(url, 'post', {
                        np_asid: $this.o.id,
                        np_asp_data: $('form', $this.n.searchsettings).serialize()
                    }, _loc);       
                }

    But i’m not using the legacy javascript source.

    The only js files loaded are :
    /wp-content/plugins/ajax-search-pro/js/min/plugin/shared/async-css.js
    /wp-content/plugins/ajax-search-pro/js/min/external/jquery.select2.js
    /wp-content/plugins/ajax-search-pro/js/min/external/isotope.js
    /wp-content/plugins/ajax-search-pro/js/min/plugin/merged/asp.js

    Thank you

    #35259

    Hi,

    If you enable the search override, it will use the GET request. Otherwise a silent POST is used to maintain the search filter and configuration states. I

    If you don’t want to use the override, then for a permanent solution, try using an override method for the window.WPD.ajaxsearchpro.helpers.submitToUrl function:

    window.WPD.ajaxsearchpro.helpers.submitToUrl = function(url) { location.href = url };

    That should override the one used in the new scripts with a simple redirection.

    Best,
    Ernest Marcinko

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


    #35260

    Participant

    Thanks a lot 🙂

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

You must be logged in to reply to this topic.