Show Featured Image, Not Image of First Variant when the page is loaded

Boram7261
New Member
3 0 0

Hi, I'm using the 'Impulse' theme. I would like to show the featured image (first image) rather than the image of the first variant when the page is initially loaded. So when the user clicks on the item to get to the product page, main product image to stay until the user selects a variant. Please help. 

0 Likes
PaulNewton
Shopify Partner
2601 136 475

Impulse is made by archetypethemes , and is a premium theme meaning most contributors don't have access to it's code like they would with a free theme.

 

Contact archetypethemes to see if they support this customization here https://archetypethemes.co/pages/support

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes
ksh_verma
Shopify Expert
35 2 4

Hi  Boram,

You need to change code in liquid file, find liquid file where product information render (mostly used product-template.liquid).
replace the code with:

{% assign featured_image = product.selected_or_first_available_variant.featured_image | default: product.featured_image %}
Try changing it to:
{% assign featured_image = product.featured_image %}

0 Likes
Boram7261
New Member
3 0 0

Thank you. 

Have a good day:)

0 Likes
Boram7261
New Member
3 0 0

Thank you so much.

0 Likes
ksh_verma
Shopify Expert
35 2 4

Always welcome :)

0 Likes
mwebb33
New Member
2 0 0

This worked! Thank you!

0 Likes