We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38512
    • 8 Posts
    I'm developing an addon that makes use of many-to-many relationships between products and ingredients. I have ingredients defined in a table and any product may contain any amount of ingredients.

    Schema in short:
    table product { id, name }
    table ingredient {id, name }
    table product_ingredients {id, product_id, ingredient_id, amount }

    How would you implement something like that as a CMP? My idea is to have a grid of all ingredients with textboxes to enter the amount but I don't know how to do it in extjs and the processor. Maybe you know of an addon that makes this happen so that I could look at the sources?
      • 4172
      • 5,888 Posts
      I would do it with a combination of xdbedit and a MIGXdb-TV

      xdbedit shows the grid for products.
      MIGXdb would show another grid in the row-editor-window with all possible incredients and has another row-editor-window for editing the amount and activating incredients to a product.

      soon, the same will be possible with MIGXdb alone. I will add some Docu to rtfm how to configure something like that with MIGXdb, when its done.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 38512
        • 8 Posts
        I'm developing my own addons to manage the entire site portfolio and would like to keep everything in one place and try to not rely on anything external for that part. But the code in those addons sure might help! Thanks a lot.