Hi there,
This is what I am trying to do:
I am trying to create a place where people can create multiple menus for a restaurant, using a pre-determined set of food items.
So I have 2 content types:
- Food item
- Menu
I have created a many-to-many relationship between these content types, so that the food items can be reused on multiple menus.
This Food-Menu relationship has a "Price" field, so that they can set different prices for the items depending on the menu it's added to.
All of the above works great.
The issue I have now, is that the restaurant needs the ability to offer the same item, but in multiple sizes (e.g. Small, Medium or Large Coffee).
Of course the simplest solution to this is to create multiple food items, e.g. Coffee (Small), Coffee (Medium) and Coffee (Large), but I would rather have just a single item (i.e. "Coffee"), and then have another field on the relationship where they can optionally define the size.
I've added such a drop-down field, and again that works great. The problem is though, that once I have referenced Coffee once, I can no longer add it again (it disappears from the list of options because a relationship has been created).
So, is there a setting anywhere that will allow me to repeatedly establish a relationship between these items? (i.e. to connect the "Coffee" food item multiple times, each time with a different size and price?)
Thanks,
Alex
Dear Alex,
Please check these:
Dashboard-> Toolset-> Relationships
Edit the the relationship between "Food item" and "Menu"
Make sure the option "Limits" value is "No limit" to both post types
Thanks Luo Yang, but my site is already set to "Default: No limit".
I think the purpose of "No limit" is actually about how many relationships you can create between 2 types of items, not how many times you can create a relationship between the same 2 items.
Again to reiterate, I'm wondering if there is a way to connect 1 Food item (e.g. "Coffee") with the same Menu item (e.g. "Starbucks menu"), multiple times but with different prices or other options chosen from the fields attached to the intermediary post type of "Food - Menu Relationship".
Thanks,
Alex
You are right, in the same many-to-many relationship, you can setup only one relationship between Food item ("Coffee") with the same Menu item ("Starbucks menu"), and it is expected result that :
that once I have referenced Coffee once, I can no longer add it again
In your case, you might consider to setup multiple many-to-many relationships between post type "Food" and "Menu". for example:
- size A
- size B
- size C
...
Then you will be able to setup the relationship multiple times