Many to many to one, possible?

I have no idea what this setup is called, but I do have a visualization of what I’m trying to do. :innocent: (see below)

Each product has single attributes like SKU, name, category etc. The ingredients consists of two parts (actually three, but to keep it simple two parts): the ingredient name (which I want to have stored centrally in a table) and the amount.

I this setup possible? And if so, how? Oh and crucial, I would like to export the data to excel so I can import it via WP All Import to ACF.

Many thanks in advance! :smiley:

Hi @Dagaloni

We support following relation types:

  • many to many
  • has many (=many to one)
  • one to one
  • belongs to (=one to many)

You can find detailed information on how to create them on our documentation.

Also we have a video on relations which uses a related sample (Product - Details - Orders..) make sure to check it out on youtube.

For your use case (if I understand it correct) you need to create following relations between tables:

  • Product Ingredients → Products (Has many)
  • Product Ingredients → Ingredients (Has many)

Note that corresponding one to many relations (belongs to) will be automatically created.