How to get image URL for a product in Zoho Books/Inventory through a function?
Hello,
I retrieve products from Zoho Books to display them in Zoho Sites. Is use the new dynamic content feature.
Function to retrieve products:
resp = zoho.books.getRecords("Items","XXX");
return resp.get('items').toJSONList();
In HTML I loop through this list and display the products:
{% resp = functions.execute("get_products") %}
{% for item in resp %}
<div class="product">
<img class="product-image" src="{{ item.image_name }}">
<div class="product-details">
<a href="#">
<h3>{{ item.item_name }}</h3>
</a>
</div>
</div>
{% endfor %}
However the image cannot be displayed. Per product there are following image related attributes:
"image_name":"abb-b23-212-100.png",
"image_type":"png",
"image_document_id":"133014000000115186"
How can I construct a correct image URL from this?
Sunny regards,
Artjom