Retrieving images for Child Relation from the Parent #2603
Unanswered
abishekrsrikaanth
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have 2 models
And the relation is defined as:
The
product
itself doesn't have the option to upload an image, but eachvariant
has an image (Media).I need to show the image for the
Product
Model. To do this, I need to show the image of one of the variants that have an image. Is there a good way to do this or do I have to loop through the variants of the product and see which variant has an image and retrieve the URL of that image?Beta Was this translation helpful? Give feedback.
All reactions