We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1330
    • 79 Posts
    I am trying to figure out if I can use MODX to do my project of if I am going to have to incorporate another app/db with it.

    Our company needs to keep track of supplies given out. We have multiple sites (physical) and and each has its own grouping.
    We need to be able to track what is given to each employee, its not as important that the site have a link to the employee but rather that we can see how much/what each employee is getting and when.

    Eg: employee 200312, Jessica Doe received 2 boxes of gloves on May 2nd from Site 03.

    We would like to search by employee ID or name to see if the employee has recently received what they are requesting before granting their request for supplies.

    I've just started using Revo and is quite the shocker when coming from Evo.
    Anyone have any ideas on where to start with this, I'm looking through the packages but I don't see anything to help with databases or something similar to what I am trying to do.

    If you need more input just ask and I will clarify anything I can.
      • 9102 ☆ A M B ☆
      • 318 Posts
      I don't know of an existing extra that does this, but it would be pretty easy to develop one. You could create custom database tables to store your sites, inventory items and shipments, and link them to the modUser table. Each employee could be a user, and users could have multiple shipment events attached to them. The whole thing could be managed through a Custom Manager Page.

      So really it depends on whether you are up for developing a custom extra (or hiring one of the excellent MODX partner developers to do it for you).

      Alternately, you could get some other inventory management system that has an open API and integrate MODX with it. MODX plays well with others.

      Do you have another system in mind that does exactly what you want to do?
        • 1330
        • 79 Posts
        I haven't located anything that does exactly what I am looking for. I've seen different things that have bits and pieces but that's about it.

        I don't really want employees to be users because I don't want them to have access to the site/data. Only admins should have access to it.
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          The users would only have as much permission as you grant them, so it's entirely possible to limit them to viewing the information, but not editing it.

          You may need a few user groups to get the job done, but it's not very complex in the grand scheme of things.
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 1330
            • 79 Posts
            Revo has me really off balance, I see a lot of things are different from Evo, no "web users" and "manager users" for one.
            I know very little of SQL as of yet, going through W3 to learn the basics of PHP/SQL.
            Where do I start with creating an Extra?
            Thanks for the tip Pat, looks like you've been busy.

            A few other notes, we don't want employees to be able to see this information. Basically the entry form I want to be a page that you can enter their ID, FName, LName, and other information and do a lookup based on ID if the user exists already so we don't get duplicates, if not create the new employee record and add the personal information to it. Then have a form to issue items/funds (a text field). Having the issuing site based on the logged on user would be a big plus. Also need a field for description.

            I'll use PS and mock up an idea of what I am looking for. [ed. note: amazon3d last edited this post 14 years, 5 months ago.]
              • 1330
              • 79 Posts
              Attached are some basic layouts with the information. It is not complete but a place to start. I have a feeling that using users is not going to work for this.
                • 9102 ☆ A M B ☆
                • 318 Posts
                Just because someone is a user, doesn't mean you have to give them their username and password or even tell them that they're a user. The users table just happens to be a convenient place to store people, because it already has lots of people-related fields in it. You could just as well make your own table to store people -- I've done that with webinar presenters in an extra I'm working on, because I just didn't need all of the info in the users table and I didn't want the presenters to be users. So you could go either way.

                To start with developing an extra go here: http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution

                However, you may find it somewhat heavy going if you're not already familiar with PHP/mySQL -- on the other hand, it's a great way to learn because xPDO, once you get the hang of it, provides such an easy and powerful way to interact with the database.

                You might seriously consider hiring a partner to do it. The system you describe is simple enough that it probably wouldn't take that much time for a seasoned REVO dev.
                  • 1343 ☆ A M B ☆
                  • 2,213 Posts
                  Freejung already covered things some, but as noted the user table is already present and available for your use. Plus it gives you the ability to allow user logins down the road should you wish to add that capability. Allowing the user to see what they have in their possession for example.

                  In regards to Evo to Revo differences, the permission structure is totally re-hauled and more like active directory on windows servers. It's also easier to integrate with external systems, for example we got a basic Google Login snippet working in under an hour, which would be much harder under Evolution.

                  In regards to building the application, if this is going to scale any, how you setup the tables is just as important as the code driving the system. If you don't know, I would highly recommend asking, or as noted above hiring out the build. I know we have several custom database driven tools built on Revolution, it's not super difficult to accomplish if you know what you are doing.

                  I hope that helps some. If you have questions, you know where to find me smiley
                    Patrick | Server Wrangler
                    About Me: Website | Tweets |  MODX Hosting
                    • 1330
                    • 79 Posts
                    Okay so I'm working on building a CMP and I got to the following part and my Table won't build:

                    Building the Query
                    
                    First off, we need to create the table. This will be done in a resolver later, but for now, just add this to your snippet, before the return statement:
                    
                    1
                    2
                    3
                    $m = $modx->getManager();
                    $created = $m->createObjectContainer('Doodle');
                    return $created ? 'Table created.' : 'Table not created.';
                    Then go ahead and run your snippet. This will automatically create the DB table that we made in our schema. Now that you've got that done, remove that code and we can continue on.


                    Now, I'm not sure why this is happening because the paths they use for this tutorial are not exact to mine and sometimes confuse me because the paths don't make sense.

                    http://demos.graycomputer.net/index.php?id=2
                      • 1330
                      • 79 Posts
                      [[++doodles.core_path]] comes up with a blank path.
                      So somehow or another the path isn't set wherever it is supposed to be.