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

    I have to build a system where users can search for products from a product database. The product listing are nice and simple, no images just name, description and SKUs.
    Originally I thought I would simply put them in as documents and use SimpleSearch or similar but I've found out there are thousands of products.

    So then I thought about creating a custom extra, but I'm not sure how I would implement the search functionality.

    Can anyone give me any advice? I've read through the doodles tutorial and found it thoroughly confusing.

    Thanks

    EDIT: OK, so my plan is to use BobRays: http://bobsguides.com/custom-db-tables.html custom db table tutorial which I have used before and then use the second part of the Doodles tutorial to make the custom manager page so I can CRUD it up. Does anyone see a problem with that? The only question left then is making it searchable on the front end. Will SimpleSearch search custom tables?

    This question has been answered by Bruno17. See the first response.

    [ed. note: wilbobaggins last edited this post 10 years, 3 months ago.]
    • discuss.answer
      • 4172
      • 5,888 Posts
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 38359
        • 93 Posts
        Quote from: Bruno17 at Jun 28, 2016, 09:27 AM
        you had a look to the MIGXdb - doodles - Example?
        https://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials/migxdb.create-doodles-manager-with-help-of-migxdb

        No! I hadn't seen that, thanks very much - I'll give it a go.

        Many thanks
          • 4172
          • 5,888 Posts
          If you need basic searching and filtering, this is also possible without simpleSearch.

          SimpleSearch could also search custom-tables with a custom search-driver.
          I think, I had posted one somewhere in the forums, some time ago.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 38359
            • 93 Posts
            Do you know how I could add a field to the schema to create a numeric(15,2) or similar decimal column in the table?
              • 4172
              • 5,888 Posts
              something like that:

              <field key="price" dbtype="decimal" precision="15,2" phptype="float" null="false" default="" index="index" />


              after adding that field to the schema, you can add that field to your table and recreate the xpdo-map-files by the MIGX-CMP

              Fill out the package-field with the name of your package and go to the tab 'Add Fields' and click 'Add Fields'
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 38359
                • 93 Posts
                Thank you very much, I got the phptype wrong.
                  • 38359
                  • 93 Posts
                  Bruno, could you recommend any tutorials or methods for displaying the data on the front end of the website?
                  EDIT: I think I'm getting my head around it, would be grateful for any hints with the implementing the Search functionality though. [ed. note: wilbobaggins last edited this post 10 years, 3 months ago.]
                    • 4172
                    • 5,888 Posts
                    what exactly do you need to search?
                    Results only from that custom-table?

                    For displaying the data, I'm using migxLoopCollection most of the time.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 38359
                      • 93 Posts
                      Quote from: Bruno17 at Jun 29, 2016, 11:33 AM
                      what exactly do you need to search?
                      Results only from that custom-table?

                      For displaying the data, I'm using migxLoopCollection most of the time.

                      Ah, ok great that looks good. I only want to search the custom table. I need to be able to search most of the columns