<p>I'm not sure I completely understand what you're trying to achieve, but maybe the <a href="https://plugins.craftcms.com/manytomany" rel="nofollow noreferrer">Many to Many Field Type plugin</a> does the trick?</p>

CC BY-SA 4.0
2020-02-18T13:12:42.540Z
I've had a look at this plug-in and it seems to create a many-to-many relationship. But I'm looking for an all-to-all relationship. Every product should be automatically added as a relationship to every dealer for which each dealer can add their own prices.
Dirkv01
CC BY-SA 4.0
2020-02-18T13:20:00.203Z
Hm, I understand what you need now. You need to add a value for each automatically related product. The 'correct' way would be to build a plugin or module for it. The plugin would provide a fieldtype, and the fieldtype would display a list of products, with an input field for each product.
Paul
CC BY-SA 4.0
2020-02-20T10:09:40.550Z
Thanks for the answer, creating a custom plugin with a new fieldtype provided me with the answer I was looking for!
Dirkv01
CC BY-SA 4.0
2020-02-20T10:11:26.313Z
If you only use it for one site, make it a module!
Paul
CC BY-SA 4.0
2020-02-14T22:28:27.790Z
2020-02-14T22:28:27.790Z
Paul
<p>I'm trying to pair all my custom product entries to all my dealers with 2 extra fields per product: price per day and price per week. The condition is that all my products are paired to all my dealers in advance. So when adding a new dealer I would like to show a table or some sort listing with all my products with the 2 fields in different columns.</p>

<p>I've tried to do this with a static table (Super table plug-in) and sort of succeeded:
I made a new field for my dealers with each field named after a product and the field type set to a normal table with 2 columns for my 2 fields. In my templates I would query based on my product name and match the correct row from my Super table field, but it just seems error prone and not managable.</p>

<p>Does anyone have any advice on how to implement this in a correct way?</p>

<relations>
Relationship all to all
# Relationship all to all

(Asked by: username_0 on 2020-02-12)

I'm trying to pair all my custom product entries to all my dealers with 2 extra fields per product: price per day and price per week. The condition is that all my products are paired to all my dealers in advance. So when adding a new dealer I would like to show a table or some sort listing with all my products with the 2 fields in different columns.

I've tried to do this with a static table (Super table plug-in) and sort of succeeded:
I made a new field for my dealers with each field named after a product and the field type set to a normal table with 2 columns for my 2 fields. In my templates I would query based on my product name and match the correct row from my Super table field, but it just seems error prone and not managable.

Does anyone have any advice on how to implement this in a correct way?

**Tags:** relations

---

## 1 answers

### Answer by username_1 on 2020-02-14. Score: 1 | Accepted answer

I'm not sure I completely understand what you're trying to achieve, but maybe the [Many to Many Field Type plugin](https://plugins.craftcms.com/manytomany) does the trick?

> **Comments:**
> **username_0**: I've had a look at this plug-in and it seems to create a many-to-many relationship. But I'm looking for an all-to-all relationship. Every product should be automatically added as a relationship to every dealer for which each dealer can add their own prices.  
> **username_1**: Hm, I understand what you need now. You need to add a value for each automatically related product. The 'correct' way would be to build a plugin or module for it. The plugin would provide a fieldtype, and the fieldtype would display a list of products, with an input field for each product.  
> **username_0**: Thanks for the answer, creating a custom plugin with a new fieldtype provided me with the answer I was looking for!  
> **username_1**: If you only use it for one site, make it a module!  

---

