Narrative theme: How to disable featured image in product gallery on bottom of the page

Highlighted
Tourist
4 0 1

Hello guys,
I am currently developing a store for a client who sells beverages, and need just a little bit of tweak to the product gallery of Narrative. Displaying big images on the bottom of the page are fine for us (I saw many people don't like it), as we can really tell stories in pictures.

 

However, this gallery starts with the first uploaded picture, making it redundant for us - since it is also the product picture, and they sometime have low-quality images, so if necessary we don't want to stretch them out in a gallery.

 

So we we would like to get rid of the feature that includes the featured product image in the bottom-page product gallery - we want to display the pictures except for the first picture uploaded (product photo).

 

Edit: clicking on any image shown on the product page should still show a slideshow of every picture uploaded, that changed should not affect that. I uploaded a snapshot so it's more clear what we want to do. We want to turn the gallery into a how-it's-made type of impression, so we don't need the featured product photo :)

Product gallery - we want to remove the first image shownProduct gallery - we want to remove the first image shown

 

I looked into the code, but couldn't pinpoint what I should change. Thanks for your help in advance!

0 Likes
Highlighted
Tourist
5 0 1

You can go to Product pages and in media check Hide variant media in gallery. That way it will show only the images without variant one's. So if you dont have any images other the variant you selected, it will be fine. 

0 Likes
Highlighted
Tourist
4 0 1

Thanks for replying akibur!

 

I have tried switching 'Hide variant media' on and off (I left if ticked in originally), but it doesn't seem to solve my problem. It might be that the products they carry don't have variants, they are standalone products. Any suggestions how to cope with this?

0 Likes
Highlighted
Tourist
5 0 1

Oh ok. if you dont have any variants than it is a little bit tricky. I would say create couple of variants as much as image you want. Than upload images to those variant. but don't upload anything extra on product. Than hide the variants. you can do at product page settings

0 Likes
Highlighted
Tourist
5 0 1

or you can do this. This also helped me, i got this solved from @Luke121 . Kudos to him

Go to product.template.liquid and delete this code
<div class="product__submedia-list product__submedia-list--r{{ total_modulus }}{% if total_media == 1 %} product__submedia-list--single{% endif %}">
{% for media in product.media %}
{% unless variant_media_ids contains media.id and section.settings.hide_variant_media %}
{% capture data_image %}
data-parent-fit="cover"
{% endcapture %}
{% include 'product-preview-image' with media, featured_media: false, gallery_type: 'submedia', data_image: data_image %}
{% endunless %}
{% endfor %}
</div>

0 Likes
Highlighted
Tourist
4 0 1

I really appreciate your dedicated help akibur!

I went ahead and deleted that part of the code, but what ended up happening is the gallery went missing completely at the bottom of the page.

Any idea on why that might have happened?

0 Likes
Highlighted
New Member
1 0 0

Have you found the answer, I have the same problem!

 

Thanks!

0 Likes