Product images are not displayed when customizing the source code.

art_o_shi
New Member
3 0 0

How can I display items from a particular collection on a separate page?
I can see the product name and amount as in the attachment, but the product image is not displayed. (In this case, I want to use the custom field app to display it on the product details page.)

The relevant source code is below.
Even if you don't use the custom field app, for example, if you customize the source code of the top page, the same thing will happen.

The source code of collection-list-template.liquid is used.
Since the images are displayed on the collection page, some problems may have occurred when including it to the top page, etc.

----
<div class="grid-uniform">
{%- case section.settings.grid -%}
{%- when '2' -%}
{%- assign grid_item_width = 'medium--one-half large--one-half' -%}
{%- assign image_size = '540x600' -%}
{%- assign width = '540' -%}
{%- assign height = '600' -%}
{%- when '3' -%}
{%- assign grid_item_width = 'small--one-half medium--one-third large--one-third' -%}
{%- assign image_size = '345x550' -%}
{%- assign width = '345' -%}
{%- assign height = '550' -%}
{%- when '4' -%}
{%- assign grid_item_width = 'small--one-half medium--one-quarter large--one-quarter' -%}
{%- assign image_size = '250x' -%}
{%- assign width = '250' -%}
{%- assign height = '225' -%}
{%- when '5' -%}
{%- assign grid_item_width = 'small--one-half medium--one-fifth large--one-fifth' -%}
{%- assign image_size = '195x' -%}
{%- assign width = '195' -%}
{%- assign height = '125' -%}
{%- endcase -%}

{% for product in collection_ref.products %}
{% comment %}
{% if has_sidebar %}
{% assign grid_item_width = 'large--one-quarter medium--one-third small--one-half' %}
{% else %}
{% assign grid_item_width = 'large--one-fifth medium--one-third small--one-half' %}
{% endif %}
{% endcomment %}
{% include 'product-grid-item' with grid_item_width %}

{% else %}

<div class="grid-item">
<p>{{ 'collections_ref.general.no_matches' | t }}</p>
</div>

{% endfor %}

</div>

スクリーンショット 2020-09-20 192452.png

0 Likes