How can I call product image, details, and price in section page?

Solved
anupam1607
New Member
3 1 0

Hey everyone,

Can anyone tell me how can I call multiple product images, product details, and product prices on the section page?

0 Likes
anupam1607
New Member
3 1 0

This is an accepted solution.

when using the input type product into Shopify schema, you need to use the all_products object to get the details of the selected product, you need to get the details and assign it to a variable, something like this one.

{% for block in section.blocks %}
{% assign product = all_products[block.settings.product] %}
{% for image in product.images %}
<img src="{{ image.src | product_img_url: 'grande' }}" >
{{product.title}}
{{ product.price | money_without_trailing_zeros }}
{{product.description}}
{% endfor %}
{% endfor %}

 

 

0 Likes