Skip Navigation

[Resolved] Display related products filtered based upon relatioship.

This support ticket is created 5 years, 1 month 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by charleneK 5 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1386421

This one perplexes me a bit. I have a relationship between artists and item(product). This way I can associate an artist with a product, and list the artist's products on their bio page. I also display the artist on the product page. But now I want to also display the related products on a single product page, based upon the Artist. Not sure how to go about creating a view that will filter a list of products based upon the artist.

#1386807

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I have a relationship between artists and item(product). This way I can associate an artist with a product, and list the artist's products on their bio page.
===>
Ok, what relationship you implement between artists and item(product) post type? is it one-to-many or many-to-many?

But now I want to also display the related products on a single product page, based upon the Artist. Not sure how to go about creating a view that will filter a list of products based upon the artist.
===>
Can you please share the example of your connection/relationship once I check that I will be able to guide you in the right direction.

However, here is the Doc if you would like to check that illustrates how you can display the related posts:
=> https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/

#1387289

the relationship is one to many. One "Artist" to many "Products" Currently I display the "artist's" --->Products on the Artist bio page. One Single Product page, I also display the "ARtist" who made the product.

I now want to be able to display a related Products list on the single product page, but base that related product list on the Artist.

Currently.

ARTIST PAGE:
product 1
product 2
Product 3.....

Single PRODUCT PAGE:
Arist bio.

what I want.

Single PRODUCT PAGE:
'artist bio.
related product by artist.
related product by artist
related product by artist......
.....

hope that helps clear it up. 🙂

#1387775

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I understand what you want to display.

You need to create a nested view to display the related items. Set you to view to query the related artist first and create another view that should query the products that belong to the artist in parent loop.

Please check the following Doc for more reference;
=> https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
=> https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

If you need further help, please share wp-admin access details and product page URL where you want to display the related products and I'll be happy to help.

I have set the next reply to private which means only you and I have access to it.

#1388317

I was able to get this figured out based upon your support information, as well as this post: https://toolset.com/forums/topic/view-in-view-for-parent-child-relationship/