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

    In essence, for another site I am working on with Modx, I am working on a search form which has 2 fields, search by postcode and / or activity and this gets posted to other other site, and brings back the results in my site.

    In short: server-side code to-
    - receive web form content
    - make HTTP request to the other site’s web server
    - parse XML content returned (search results)
    - render results into HTML pages.

    (It’s not the amazon site, although has many of the similarities to where smaller bookstores use the amazon API to have a local search from Amazons store, although the processing of results is more complicated.)

    There’s probably a really easy way to do this, and have sussed most of it out manually on another site (not using Modx or a CMS, just with some simple .php pages), but am trying to make this work with Modx and trying to establish whether I use or adapt any existing snippets or just do it from scratch building a new simple snippet purely for this task.

    I’ve been given the url, passwords and string under a licence from the other site, and also the XML Schema, and have been exploring whether to use a combination of snippets (looked into Feedx, XSLT and the hyper-search form to name a few), but none seem to have what I am quite looking for (someone please point out - if I have got this totally wrong, unless I can mash up both together!)
    Anyone else modified snippets to do this or have some best practice/code examples to share, or is it best to just ’hand-make’ it from scratch, and if so will it work within the Modx framework?
    (I know - I need to study abit more the backbone to Modx for queries like these, will get round to it one day soon!)

    Thanking anyone out there in anticipation for any suggestions on how to go forward with this - it has been plaguing my head for a couple of days, and can’t see the answer to it for some reason! Should be really logical and simple!


    Laura

    (PS - Modx rocks!)
      • 94
      • 9 Posts
      smiley Thanks for that - that is what I was thinking but unsure if it would have been better using snippets to assist, or if the results wouldn’t format properly! (quite often still do alot manually to find after there was a snippet that could do the job better!). One of those things just to try before asking next time, as I’ve got it working on a basic non-cms site already.

      Thanks for the support!
      Laura