Hi Jamal
No worries.. in fact, I am glad it's you who has been assigned this ticket as it's connected to the support you had provided to me
Here's the connected ticket
https://toolset.com/forums/topic/create-a-relationship-between-brand-and-brandowner-connected-to-a-country/
So if you remember, you helped me to create a relationship between a brand and brand distributor for a specific country. This country is an intermediary post value, the field name is 'eyewear-store' and there's a reason why it's a multiple checkbox.. it's a decision you and I had confirmed as necessary due to the fact that if a brand owner could be a distributor for a brand for multiple countries we had to use the multiple checkbox option
My query in that ticket
so if a brand has a distributor for multiple countries, a SELECT field would not help.. hence the checkbox option.. hope I am doing things right with the checkbox, in this case..
Your response
I just tested my first suggestion on a new install and you were right, we can't connect a Brand and a Brand Owner several times for each country.
That was just to bring to your notice why there's a multiple checkbox field in that relationship..;-).. Also the 'eyewear-store' checkbox has 'in' and 'ae' as two options for now (this would be important for you to understand the requirement of this ticket)
Now coming to the current ticket.
Brand Owner had a child 'Brand' and Brand has a child 'Eyewear Collection'
We are currently in the 'Eyewear Collection Page' which is a Content Template of Eyewear Collections.
So we are able to get the grand parent ie The Brand Owner.. and if you remember in the previous ticket we had the option of multiple distributors in the brand-distributor-eyewear-brand relationship. Now in addition to the multiple distributors, in each distributor we have a multiple checkbox option.
So once we have the grand parents (it could be multiple) we need to check in the eyewear-store field and match the [wpv-user field='wpcf-user-store'] as the user is logged in.. if they match(eyewear-store and user-store) then I need the ids, name, mobile and email of those grand parents..
I need you to advise me if I can get all of those (ids,name,mobile and email) with one loop and then display then one at at time or do I need to loop each time for each of them.
Also it'd help you to know that Minesh has already created a custom code to check if the user-store matches eyewear-store and it's it's stored in the Custom Code section in Toolset Settings.
Do let me know if you need anymore information..:-)..
Have a nice day..:-)..
Regards,
Alim