Skip Navigation

[Resolved] Should I use repeating fields or relations

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Author
Posts
#906386

Now that this amazing new version came up, I'm re-thinking the database from scratch.

I need custom fields or relations to WooCommerce products. The goal is to offer the easiest way for the client to edit products and still maintain flexibility.

An example: there's a product feature "installation manner". The product can have one installation manner, but there are many to choose from and client should easily be able to add these installation manners (without having to edit fields in Toolset).

Do I understand right that this would require relations? I understand the repeatable fields (or field groups) are individual, not sharable with other products/posts.

If this is the case and I will use the relations, the only problem is the not-so-nice visuality as the custom field groups have. They are nicely and user friendly visually groupable, but these relations are as one big list in the end of the other fields. Or have I missed something here? Is there a way to group also relations?

#906649

Hello,

I assume we are talking about this case:
1) Two custom post types: "WooCommerce products" + "installation manner"
2) One "WooCommerce products" post can connect with one ore more "installation manner" posts,
3) One "installation manner" post can can connect with one ore more "WooCommerce products" posts

If it is, I suggest you try to setup many-to-many relationship between post types "WooCommerce products" and "installation manner".

See our document:
https://toolset.com/documentation/post-relationships/

#911000

Hello,

If the only way to make it easy for client to add those "installation manners", and I would end up using relations, the point 1 would be:
1) About 80 custom post types.

And this is excactly the core of the problem. If I have about 80 relations at the end of the product in one long list, it's very unfriendly for the user. So I will probably end up using the custom fields (select) anyway because it is clearer and client will not add the fields/related records so oftens as he chooses one of the existing ones.

#911001

Thanks, I will mark this now as resoveld.