We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52464
    • 14 Posts
    Hi. I'm a novice developer learning Modx.
    I'm creating a custom eCommerce site using my own custom tables inside the Modx database.

    I'm trying to figure out how the final user of the site should add, edit or delete products, clients, orders and whatever the business may need, along displaying sales information and creating small news or blog entries.

    I thought that the best way was to use the manager to handle the products, clients and orders, because I can use the manager to authenticate the user, to let the user create news and manage all the business items, keeping all the functionality in one place.

    I would like to know how to implement all CRUD operations on custom tables; for example: is it possible to create, edit and delete products on the same way as you would do with Resources, but with custom tables?

    I have read that after creating a Resource, you can grab the fields and Template Variables values to store them on a custom table using the OnDocFormSave event to run a plug in for that task. However, I would have two tables containing the same values (the Modx table for the Resource and my own custom table) and I would have to synchronize them.

    I think that it would be better to set the manager to store the item values only on the custom tables, because I don't want to mix the item data with data related to Modx.

    Is there a way to achieve that, or maybe there is a more common solution that I haven't read yet?

    Thanks a lot for your help.

    I'm on Modx Revolution 2.5.7.
      • 17301
      • 932 Posts
      Hi keytarist,

      You may actaully want to look at some of the ecommerce solutions that are already available and save yourself a TON of work.

      MiniShop 2 - Though the documentation is in russian and payment gateways can be a limiting factor as they also cater more towards the russian market.

      Or there's two premium extras SimpleCart or Commerce from ModMore ( https://www.modmore.com/?via=1346 )



        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 4172
        • 5,888 Posts
        you can build, what you need with help of MIGXdb
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 52464
          • 14 Posts
          Thanks for your suggestions, I'm taking my time to check them.