Topic by kahelfrich
Content
I'm stumped. I am trying to do some work with access control based on the products associated to an answer.
I'm on a clone of the answers/detail page, and I added some code to start figuring out the syntax.
The fetch of the answer is working OK, and when I print the answer ID or count($ans->Products), I get the right value.
As my first test, I wanted to print the Name of each ServiceProduct in the array, but I can't.
This seems to be working OK - not throwing an exception: $p = $ans->Products->fetch($i);
How would I access the Name of $p, if not $p->Name? I tried $p->Name->value, too. No dice.
Ultimately, I need to look at the root of the products and make some decisions based on that.
Does anyone have any ideas?