Tell us what you are trying to do? Display a list of WooCommerce Products that belong to a Creator (CPT)
Is there any documentation that you are following? Reading this thread here: https://toolset.com/forums/topic/still-confused-about-intermediary-post-for-post-to-post-relationship/
Is there a similar example that we can see? Probably, can't think of any right now.
What is the link to your site? hidden link
---
Hey guys,
The purpose is to create a View that returns a list of WC Product IDs we can use in the standard WC shortcode like [products ids="12345,12346,12347"].
-We have the "Creators" CPT which is used for our members profile.
-We have the "Designs" CPT which is used to contain the data required to make a certain custom product.
-We have a one-to-many relationship from Creators => Designs (one Creator may have many Designs)
-We have a one-to-many relationship from Designs => Products (one Design may be used to make many Products)
Now we want to pull a list of product IDs which have a Design associated to the Creator you are viewing.
Link to a Creator profile: hidden link
Reading the thread I linked above, it looks like it may be best to use a Taxonomy to link Products to Creators but I don't think Toolset support linking CPTs as custom taxonomies.
Would you please point me in the right direction for setting up this view?
Another approach I was thinking about is to add a WooCommerce attribute "Creator", but this will create an actual attribute-archive for "Creator". We don't want to use a WooCommerce Archive here, so I would need to override this archive with the CPT "Creator" because I want website.com/creator/john-doe to link to the custom profiles.
This would let me use the WooCommerce shortcode [products attribute="creator" terms="john-doe"], where john-doe would be the Creator CPT slug. In terms of query, this is probably more optimized. I would have to make sure that for every new Creator (CPT), I add a corresponding WooCommerce term for the attribute "Creator".
Do you think this is a better approach? Would I be able to replace the WC attribute-archive with our custom CPT?
Thanks a lot!
---
Last thing... How can we add a multiple-value custom field to the CPT edit screen?
Because "Designs" can have color variations we would like to be able to add variations to it. This variation would simply contain a string of text, something like:
-Design ABC
--Colorway #1 => E1:Red;E2:Blue;E3:Black
--Colorway #2 => E1:Green;E2:Yellow;E3:Black
...
My approach is to create a custom field "Colorway(s)" for "Designs" which is a Single Line and I have enabled "Allow multiple instances of this field".
However it looks like I can't display this field on the edit screen. How would I add data to this custom field? Is my approach wrong?
Thank you again!