Displaying image from related CraftCommerce entry Folks:

I'm using CraftCommerce. I have a main product and several accessories related to that product. Accessories have a title, description, price, and image.

Now, I have no problem pulling the title and description for the related accessories using this:

    {% for relatedProducts in product.relatedAccessories %}
       {{ relatedProducts.title }} - {{ relatedProducts.accessoryDescription }}
    {% endfor %}


Where I've got a problem is pulling the related image. If I use {{ asset.getUrl }} it pulls the first image from the main product entry rather than the image in the related entry. I have tried Get image from related entries asset field and How do I pull related entries and assets? without success.

Any assistance would be great.
Ok first thing take the s off relatedProduct because each loop is over one relatedProduct ;) - then you can do something like this:

{% for relatedProduct in product.relatedAccessories %}
   {{ relatedProduct.title }} - {{ relatedProduct.accessoryDescription }}
   Url: {{ relatedProduct.yourAssetHandle.first().url }}
{% endfor %}


You should probably protect that by first checking {% if relatedProduct.yourAssetHandle.first()|length %} unless you can be completely certain you will have an asset (required field for example).