We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1634
    • 51 Posts
    Hi all,

    I’m running ModX v0.9.6.2 and AjaxSearch v1.8.0

    I am trying to get two search boxes to work on one page. One is a site search and the other is a product search. I can’t seem to get this working. When I sumbit from the second search it uses the text from the first search (’search here...’) as the search terms.

    Does anyone know how I might go about this?

    I feel like I must be missing something. Any help is most appreciated.

    Thanks in advance.
    AndyFlan
      Hmmmmm.

      It's all a delusion
      • 1634
      • 51 Posts
      Btw:

      I’m in non-ajax mode so JS is not an issue
        Hmmmmm.

        It's all a delusion
        • 4310
        • 2,310 Posts
        Quick thought - maybe you’d need the form id and/or input id of each to be different.
          • 1634
          • 51 Posts
          Cheers for your reply smiley

          Yes I’d thought that through, so...

          I duplicated the AjaxSearch install so now I have 2 snippets, AjaxSearch and AjaxSearch2. I configured AjaxSearch2 to use .../snippets/AjaxSearch2 as the path instead of the default and edited the template for AjaxSearch2 to use different a id on the inputs. My AjaxSearch2 snippet still seems to use the AjaxSearch directory... its as if i havent re-pointed the path. Have looked all over the code for another path detection/declaration but can’t find it. I am guessing that the method of running 2 installs side-by-side has changed since it was documented in the wiki.

          Anyone got a new guide to running 2 instances of AjaxSearch?

          Cheers again.

            Hmmmmm.

            It's all a delusion
            • 5811
            • 1,717 Posts
            Anyone got a new guide to running 2 instances of AjaxSearch?
            Not.
            Read this post. It could be your solution (a search dedicated to the site or to products). If yes, may be if you are not far away of a beach, it could better to wait wink rather to start an heavy hack of AS