We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41970
    • 79 Posts
    I need to figure out a solution for a properties search within modx. Where the user sees a search form with options like "Property Type", "Property Category", "# of Bedrooms/Bathrooms" etc. It will be mostly dropdown/listmenus. After that, the search results are showing and the user can filter/sort that search results based on certain criteria (eg. price, date etc.).
    This will be my very first search project like this, and I would really appreciate if someone could give me some tips of how to start, which package to use etc.?
      • 41273 ☆ A M B ☆
      • 25 Posts
      Hi there,

      I think the key here is how are you going to store the results once you receive the results from what I am presuming is the MLS service you are interfacing with.

      I would think that storing your data in either a temporary JSON or XML file would be a start. Once you have your data stored, you can then sort the data however you like via AJAX. I am not sure there is anything 'out of the box' that would work. The way I would approach this would be through custom snippets and chunks.

      I am not the best programmer, so hopefully if there is a better way to do this, someone else will chime in. I will be interested in the responses and how to do this more efficiently as well.

      Dan
        email - [email protected]
        twitter - @danhartaz
        • 41970
        • 79 Posts
        Hi Dan,

        I probably forgot to mention something important - I am not dealing with MLS here, but it's just going to be single listings. This is a client on an island, so there is no MLS, and I think this way it's also easier to manage the data, since there never will be that many, or many updates. The client will simply enter the listings manually, whenever she gets new properties under contract.

        I was thinking about using MIGX, but then I am still clueless of where to start....I guess I'll have to experiment a little bit, until someone else helps with some hints. I am not a programmer myself, but a designer, but working with modx gets more and more fun, the more I work with it.
          • 41273 ☆ A M B ☆
          • 25 Posts
          Oh wow, gotcha.

          What I have done in the past in a situation like this is to utilize the Articles addon. You can create all of your own Template Variables for all the data you would like to have entered in to a listing. From there, you could utilize getResources to retreive your property listings. You could then add in pulldowns to custom sort your data when you search for the properties.

          I personally have not utilized MIGX, but this looks like a great solution as well. If it turns out the Articles approach is a viable option, I would be happy to help get you started. This is the really nice thing about MODx...there are usually several ways to do things. Some may be more correct or better than others, but as long as you get done what you need done and the end user is happy, that is the key point. smiley

          Dan
            email - [email protected]
            twitter - @danhartaz
            • 41970
            • 79 Posts
            The Articles addon I have not used so far, but I will definitely take a look at it, thanks! MIGX is pretty cool, I use it for my news overview pages, or slider where I also need to have a caption text etc. It's one of my favorite tools in modx so far. getResources is very good too, but I didn't use it that often as yet.

            I will read the Articles doc first, and I might get back to you on that if that's ok for you.
              • 4172
              • 5,888 Posts
              here is a nice example, how you can use MIGXdb and bloX, if you want to store your records into a custom-table:

              http://www.bdcreative-design.com/blog/creating-a-cmp-in-modx-using-migxdb/
              http://www.bdcreative-design.com/blog/data-from-the-migxdb-cmp/
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                If you like getResources, then you'll really like pdoTools and its pdoResources snippet. Much faster, and the only difference in using it is the snippet name. https://forums.modx.com/thread/85454/pdoresources-replacement-for-getresources#dis-post-471220
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 3749
                  • 24,544 Posts
                  This may be out of your comfort zone, but it would be the most efficient method: http://bobsguides.com/custom-db-tables.html. It's an alternative to having a separate resource for each property (which is relatively slow and wastes space). The application in the tutorial is not that far from what you want. It's quotations instead or properties, but the concepts are all the same.

                  As the list of properties grows, using TVs to store the various features of each property will make searching slow because TVs don't lend themselves to rapid searches since they involve several different DB tables.

                  That said, if there won't be that many properties, using MIGX, getResources, or pdoResources would probably work fine and would probably be a lot easier to set up.

                  It's a good idea to figure out all the different ways you might want to search for properties before starting (e.g., sq. footage, location, bedrooms, baths, min and max price, etc.), especially if you will be using a custom DB table.

                  It's both a curse and a blessing that in MODX there are about 100 different ways to do what you want. wink



                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 41970
                    • 79 Posts
                    A big thanks to all of you, I will look into all those options and then decide what suits best smiley I am trying to get the other pages out of the way first, before I trow myself into the property listings wink
                      • 23299
                      • 1,161 Posts
                      Hi All,

                      If you have success I am hoping you keep this thread alive and tell us all the pain, agony and triumph of doing this!

                      I had a couple of conversations with agents about doing a real estate site for them. I do real estate photography and have built several custom static sites.

                      I would be careful with reaching a firm understanding with the client as to what you can and cannot deliver. My experience with agents is that there is always "one more thing" and they suddenly want MLS connectivity, mortgage tables, loan calculators that connect with their listings and other heavy lifting items that require more programming than you thought was going to be needed.

                      It has been a while since I looked but AFAIK there is little in the way of documented roadmaps for doing real estate sites in MODx. It would be great to see more work being done in this arena.

                      Best of luck to you!

                      Max