Forums Forums Search & Filter Pro Return URL after reset to last category instead of SHOP?

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #182863

    Would it be possible to alter the return URL after pressing the RESET button to go to the last known product category? We don’t make use of the default Woocommerce SHOP page.

    Trevor
    #182870

    Let us say you are on a shop category page and you want the form cleared but to stay on that page? Is that what you want?

    Trevor
    #182872

    If it is, are you able to send me a live link/URL to a sample search page so I can take a look?

    Anonymous
    #182878
    This reply has been marked as private.
    Trevor
    #182900

    There is not a simple way to do as you ask, however …

    You would need some custom javascript (I can’t help you with this) that runs on document load. It looks to see if an input with the class search-filter-reset exists on the page, and if it does, it deletes that, finds the URL of the page and strips off the search query string, and inserts a link to that URL into the <li> with the class of sf-field-reset.

    In effect, the Reset button no longer runs our javascript, but instead reloads the page without any query, which resets the query but keeps the form on the page.

    Alternatively, if you want to code this in PHP, don’t have the Reset button in the form, but instead have a button immediately after the form with the current page URL in it.

    Anonymous
    #182936

    Ok thanks Trevor!

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