Changing Product Thumbnail without changing first media

Hi all, I’m looking to see if there’s a way of changing my product’s thumbnail without having to change the first piece of media in it (a video). This is because the video’s thumbnail doesn’t display the product, though I still want the video to stay exactly where it is.

naturebed.com.au/products/naturebed-hammock

I’d also prefer to not change my video’s thumbnail either as it loops in a calming fashion.

Sorry if I’ve been too wordy or confusing. Please feel free to ask for clarification.

Thank you in advanced.

Brendan

Hi @NatureBed ,

You don’t want to show a video at product item?

Do you want it to show a thumbnail instead of a video?

Please send me the code of product-grid-item.liquid file, I will check and guide you to change it

Thank you for your reply, here you are:

{%- liquid
assign has_color_swatches = false

if content_for_header contains ‘debutify’ and settings.dbtfy_color_swatches
if settings.dbtfy_color_swatches_grid != blank
if product.available and product.variants.size > 1
assign has_color_swatches = true
endif
endif
endif

if emptyState
assign product_link = ‘/admin/products’
assign vendor = ‘home_page.onboarding.product_vendor’ | t
assign title = ‘home_page.onboarding.product_title’ | t
assign compare_at_price = 2999
assign price = 1999
else
assign variant = product.first_available_variant
assign product_link = product.url | within: collection
assign vendor = product.vendor
assign title = product.title

assign compare_at_price = product.compare_at_price
assign price = product.price
endif

if compare_at_price > price
assign on_sale = true
else
assign on_sale = false
endif

if product.available or emptyState
assign sold_out = false
else
assign sold_out = true
endif

if settings.grid_product_hover and product.media.size > 1
assign image_hover = true
assign media_hover_image = product.media[1].preview_image
else
assign image_hover = false
endif

assign variant = product.selected_or_first_available_variant

capture product_collections
for collection in product.collections
echo collection.handle

unless forloop.last
echo “,”
endunless
endfor
endcapture
-%}

{%- assign media = product.media.first -%}

{%- if emptyState -%}
{{ ‘product-’ | append: current | placeholder_svg_tag: ‘card-image placeholder-svg’ }}
{%- elsif media != blank -%}

{{ media.preview_image.alt }}

{%- if image_hover -%}

{{ media_hover_image.alt }}
{%- endif -%} {%- else -%} {{ 'product-' | append: current | placeholder_svg_tag: 'card-image placeholder-svg' }} {%- endif -%}

{%- unless settings.tag_placement == ‘none’ -%}
{%- if sold_out -%}

watch_later

{{ ‘products.product.sold_out_html’ | t }}


{%- elsif on_sale -%}
{%- capture discount_price -%}
{%- if settings.sale_type == ‘amount’ -%}
{%- assign discount_price = compare_at_price | minus: price -%}

{{ discount_price | money }}
{%- elsif settings.sale_type == ‘percentage’ -%}
{%- assign discount_price = compare_at_price | minus: price | times: 100 | divided_by: compare_at_price -%}

{{ discount_price }}%
{%- endif -%}
{%- endcapture -%}

{%- if settings.dbtfy_discount_saved -%}

local_offer

{{ ‘products.general.save_html’ | t: saved_amount: discount_price }}


{%- endif -%}

{%- endif -%}
{%- endunless -%}

{%- liquid
unless emptyState
render “dbtfy-quick-view” with product as product
render “dbtfy-wish-list” with product as product
endunless
-%}

{%- liquid
unless emptyState
if product != blank
render “dbtfy-collection-addtocart” with product as product, sold_out: sold_out
endif
endunless
-%}

{%- liquid if has_color_swatches unless emptyState render "dbtfy-color-swatches" with product as product, type: 'product_grid', position: 'center' endunless endif -%}

{{ title }}

{%- liquid
if settings.review_badge_product_grid
unless emptyState
render “review-badge” with product as product, position: “product_grid”
endunless
endif
-%}

{%- if settings.dbtfy_color_swatches -%} {%- if product.price_varies and emptyState == false -%} {{ product.price_min | money }} {%- else -%} {{ price | money }} {%- endif -%} {%- else -%} {%- if product.price_varies and emptyState == false -%} {{ product.price_min | money }} + {%- else -%} {{ price | money }} {%- endif -%} {%- endif -%}   {%- if on_sale -%} {{ compare_at_price | money }} {%- else -%} {%- endif -%}

{%- if variant.available and variant.unit_price_measurement -%}
{%- capture unit_price_separator -%}
/ {{ ‘general.accessibility.unit_price_separator’ | t }} 
{%- endcapture -%}

{%- capture unit_price_base_unit -%}

{%- if variant.unit_price_measurement.reference_value != 1 -%}
{{- variant.unit_price_measurement.reference_value -}}
{%- endif -%}

{{ variant.unit_price_measurement.reference_unit }}

{%- endcapture -%}

{{ 'products.general.unit_price' | t }} {{ variant.unit_price | money }}{{- unit_price_separator -}}{{- unit_price_base_unit -}} {%- endif -%}

{%- if settings.grid_product_vendor -%}

{{ vendor }}

{%- endif -%}

{%- if settings.dbtfy_sales_countdown -%}

{%- endif -%}

Hi @NatureBed ,

Please change code:

{%- liquid
assign has_color_swatches = false

if content_for_header contains 'debutify' and settings.dbtfy_color_swatches
if settings.dbtfy_color_swatches_grid != blank
if product.available and product.variants.size > 1
assign has_color_swatches = true
endif
endif
endif

if emptyState
assign product_link = '/admin/products'
assign vendor = 'home_page.onboarding.product_vendor' | t
assign title = 'home_page.onboarding.product_title' | t
assign compare_at_price = 2999
assign price = 1999
else
assign variant = product.first_available_variant
assign product_link = product.url | within: collection
assign vendor = product.vendor
assign title = product.title

assign compare_at_price = product.compare_at_price
assign price = product.price
endif

if compare_at_price > price
assign on_sale = true
else
assign on_sale = false
endif

if product.available or emptyState
assign sold_out = false
else
assign sold_out = true
endif

if settings.grid_product_hover and product.media.size > 1
assign image_hover = true
assign media_hover_image = product.media[1].preview_image
else
assign image_hover = false
endif

assign variant = product.selected_or_first_available_variant

capture product_collections
for collection in product.collections
echo collection.handle

unless forloop.last
echo ","
endunless
endfor
endcapture
-%}

  
    {%- assign media = product.media.first -%}

    {%- if emptyState -%}
    {{ 'product-' | append: current | placeholder_svg_tag: 'card-image placeholder-svg' }}
    {%- elsif media != blank -%}
      {%- if media.media_type == 'image' -%}
      

        
      

      {%- else -%}
        {%- assign media = product.media[1] -%}
        
          
        

      {%- endif -%}

    {%- if image_hover -%}
    
      
    

    {%- endif -%}
    {%- else -%}
    {{ 'product-' | append: current | placeholder_svg_tag: 'card-image placeholder-svg' }}
    {%- endif -%}
  

{%- unless settings.tag_placement == 'none' -%}
{%- if sold_out -%}

watch_later

{{ 'products.product.sold_out_html' | t }}

{%- elsif on_sale -%}
{%- capture discount_price -%}
{%- if settings.sale_type == 'amount' -%}
{%- assign discount_price = compare_at_price | minus: price -%}

{{ discount_price | money }}
{%- elsif settings.sale_type == 'percentage' -%}
{%- assign discount_price = compare_at_price | minus: price | times: 100 | divided_by: compare_at_price -%}

{{ discount_price }}%
{%- endif -%}
{%- endcapture -%}

{%- if settings.dbtfy_discount_saved -%}

local_offer

{{ 'products.general.save_html' | t: saved_amount: discount_price }}

{%- endif -%}

{%- endif -%}
{%- endunless -%}

{%- liquid
unless emptyState
render "dbtfy-quick-view" with product as product
render "dbtfy-wish-list" with product as product
endunless
-%}

{%- liquid
unless emptyState
if product != blank
render "dbtfy-collection-addtocart" with product as product, sold_out: sold_out
endif
endunless
-%}

{%- liquid
if has_color_swatches
unless emptyState
render "dbtfy-color-swatches" with product as product, type: 'product_grid', position: 'center'
endunless
endif
-%}

{{ title }}

{%- liquid
if settings.review_badge_product_grid
unless emptyState
render "review-badge" with product as product, position: "product_grid"
endunless
endif
-%}

{%- if settings.dbtfy_color_swatches -%}

{%- if product.price_varies and emptyState == false -%}
{{ product.price_min | money }}
{%- else -%}
{{ price | money }}
{%- endif -%}

{%- else -%}

{%- if product.price_varies and emptyState == false -%}
{{ product.price_min | money }} +
{%- else -%}
{{ price | money }}
{%- endif -%}

{%- endif -%}
 

{%- if on_sale -%}
{{ compare_at_price | money }}
{%- else -%}

{%- endif -%}

{%- if variant.available and variant.unit_price_measurement -%}
{%- capture unit_price_separator -%}
/ {{ 'general.accessibility.unit_price_separator' | t }} 
{%- endcapture -%}

{%- capture unit_price_base_unit -%}

{%- if variant.unit_price_measurement.reference_value != 1 -%}
{{- variant.unit_price_measurement.reference_value -}}
{%- endif -%}

{{ variant.unit_price_measurement.reference_unit }}

{%- endcapture -%}

{{ 'products.general.unit_price' | t }}
{{ variant.unit_price | money }}{{- unit_price_separator -}}{{- unit_price_base_unit -}}

{%- endif -%}

{%- if settings.grid_product_vendor -%}

{{ vendor }}

{%- endif -%}

{%- if settings.dbtfy_sales_countdown -%}

{%- endif -%}

Hope it helps!