Skip Navigation

[Resolved] Post relationship: Product, Colour Palette, Surface

This support ticket is created 6 years, 9 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 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 5 replies, has 3 voices.

Last updated by sachaB 6 years, 8 months ago.

Assisted by: Mohammed.

Author
Posts
#624468
FINISHES copia.jpg
FINISHES_jpg.png

Tell us what you are trying to do?
Hello, I need to create a relation between a product (Kitchen), that has a colour palette (dark, light, etc.) and display the surfaces available for a certain colour palette (surface A, surface B, surface C, etc), grouped by type (door, island detail, worktop, cabinet, etc.)

Is there any documentation that you are following?
I am following the one-to-many and many-to-many tutorials but cannot understand how do I set up the logic before creating the post types or taxonomies

Is there a similar example that we can see?

What is the link to your site?
The development site is on hidden link
But I am still working on the backend. I cannot understand what is the best way to organize relationships

#624561

Hello, thank you for contact us. I will try to do my best to help you.

Regarding your question about the relationship, one of the possibilities is to create two CPT, one for Colour palette and another one for surfaces. Then create a relationship where the product can have has many colour palettes and colour palette has many surfaces.Also, you can create a custom Taxonomy called Type in order to sort the CPTs as in the screenshot.

I would suggest you take a look at the references sites like the Real State, https://toolset.com/learn/real-estate-reference-site-structure/
There are some examples of post types relationship in the reference sites.

Another option, it can be to create taxonomies for Colour palette and Surfaces, and taxonomy terms for each one. There are some explanations here: https://toolset.com/documentation/user-guides/create-custom-taxonomies/

You would have to play with both structures and check which bests suits to you, but we would suggest you the post type relationship.

Please let me know if this solves the issue or if you need further details.

Have a good day.

#626601

Hello,

I have been playing around with the suggested options.
Real Estate does not apply since I have one item Surface that can be related to many Kitchen products and can have more than one Colour Palette and more than one kitchen location.

What I made so far is:
Create the Finishing Item as CPT
Create Color Palette as custom taxonomy
Create Kitchen Part as custom taxonomy

I made it to display the kitchen parts, in an archive page, grouped by color palette.
I need to make another sub-group with the kitchen parts - as per the images FINISHES_jpg.png

I am stuck in creating a taxonomy view inside another taxonomy view.

Thanks

#632376

Hi,

I'm sorry for this delay, actually, Jose is not a part of Toolset now and somehow we lost the notifications of this ticket.

I will check the ticket and get back to you ASAP.

Thanks.

#632535

Hi Sacha,

I'm abit confused about the current structure of your website.

But, I don't think that taxonomies will do the job for you as you have many nested taxonomies except for if you are using hierarchical taxonomies.

hierarchical taxonomies will enable you to filter the taxonomies by their parents.

So, for example, you can create a taxonomy for the color palette, in the color palette taxonomy, you can insert a taxonomy for types, the types taxonomy view will be filtered by parent taxonomy and so on. checkout this documentation page for more clarification: https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

I grabbed the following from the topic description:
I need to create a relation between a product (Kitchen), that has a colour palette (dark, light, etc.) and display the surfaces available for a certain colour palette (surface A, surface B, surface C, etc), grouped by type (door, island detail, worktop, cabinet, etc.)

Does this mean that,
You have many Kitchens
Each Kitchen has only one color palette
Each color palette has one or more surface
each surface may one or more type

I'm OK if you are happy with the nested Views idea but I need to understand this to help you probably to get a better structure for your website.

Thanks.

#657281

Hello,
I managed to resolve using separated Taxonomies and avoiding nested taxonomies.

Thank you