We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32380
    • 137 Posts
    Hi hope someone can help with the following

    I have a client that need an online order system (without payment) for there existing clients, theres not that many products and it doesnt need to work out pricing, but it will have to do the following

    • Customer login - (no problem)
    • Customer locate product and fill in required info eg sizes ect - (no problem with ditto)
    • Customer submits order and receives confirmation and order is emailed to my client -(no problem with eform)
    • Customer can login to view old orders (im stumped)

    hope someone can help smiley

    admin note: subject clarified
      • 32645
      • 377 Posts
      I think you will need to create a custom module that displays the old orders in the CMS, assuming the orders is a MySQL table, etc.
        • 32380
        • 137 Posts
        I have been reccomended this
        http://modxcms.com/forums/index.php/topic,8111.0.html
        but it might be a little over my head
          • 32380
          • 137 Posts
          and possibly storing info in doc xml?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            You can store the order data in any way you like, but using the database would be easiest as well as most secure. In any case, you’ll need to make a snippet to extend eForm to save the data, and a module to allow access to the data.
              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
              • 32380
              • 137 Posts
              This sounds like a good idea but unfortunately this take would be a little about my station sad
                • 32380
                • 137 Posts
                @sottwell

                Do you know if these snippets / modules already exist?
                  • 5340
                  • 1,624 Posts
                  1. Save information into a custom table with something like EformDb(you should also have a field that holds the customer ID)
                  2. Create a snippet that will display all the information in the database for the logged in customer. This is just a simple modx page protected by login which you already know how to do and has a call to the snippet. A simple display of the orders should be enough.

                  This is nothing major in my opinion.

                  PS: I do not think there is a need for a module in this case.


                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    PS: I do not think there is a need for a module in this case.
                    I would be very uncomfortable with a custom table and no way to access it (except raw through phpMyAdmin or whatever). Modules aren’t any more difficult than snippets. In some ways, they’re easier since you can use inline PHP if you want to; or you can use runSnippet() if you want to use an existing snippet’s code.

                    http://www.sottwell.com/create-module.html
                      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
                      • 32380
                      • 137 Posts
                      @sottwell & @Cipa

                      I get the impression this is something that should be quite easy to do but not exactly sure as my php in v basic.

                      I have read up on EformDb and it looks like its exactly what i need to add info to the database but the the logic needed to extract/query that data to display customer specific data is beyond me (at the moment), are there any tutorials or working examples out there because i have been looking but can see them?
                      This is something i really need to get working and would really appreciate any help