for block in section.blocks
if block.type == 'variant_picker' and block.settings.select_first_variant == false
assign current_variant = product.selected_variant | default: false
assign featured_media = product.featured_media
endif
endfor
assign product_form_id = 'product-form-' | append: section.id | append: '-' | append: product.id
assign product_form_installments_id = product_form_id | append: '-installments'
assign show_preorder_label = false
if settings.prod_pre_order_label_show and product.template_suffix contains 'preorder'
assign show_preorder_label = true
endif
if section.settings.enable_var_img_grouping
assign variant_image_grouping_option_index = ''
assign grouping_options = section.settings.var_img_grouping_option | downcase | replace: ', ', ',' | split: ','
for option in product.options
assign option_downcase = option | downcase
if grouping_options contains option_downcase
assign variant_image_grouping_option_index = forloop.index0
break
endif
endfor
endif
-%}
