{%- assign meta_block = section.blocks | where: 'type', 'product_meta' | first -%}
{%- assign share_buttons_block = section.blocks | where: 'type', 'share_buttons' | first -%}
{%- assign inventory_block = section.blocks | where: 'type', 'inventory' | first -%}
{%- assign buy_buttons_block = section.blocks | where: 'type', 'buy_buttons' | first -%}
{%- capture section_settings -%}
{
"enableHistoryState": true,
"templateSuffix": {{ product.template_suffix | json }},
"showInventoryQuantity": {% if inventory_block != blank %}true{% else %}false{% endif %},
"showSku": {{ meta_block.settings.show_sku | json }},
"stackProductImages": {{ section.settings.stack_images | json }},
"showThumbnails": {{ section.settings.show_thumbnails | json }},
"enableVideoLooping": {{ section.settings.enable_video_looping | json }},
"inventoryQuantityThreshold": {{ inventory_block.settings.inventory_quantity_threshold | default: 0 }},
"showPriceInButton": {{ buy_buttons_block.settings.show_price_in_button | json }},
"enableImageZoom": {{ section.settings.enable_image_zoom | json }},
"showPaymentButton": {{ buy_buttons_block.settings.show_payment_button | json }},
"useAjaxCart": {% if settings.cart_type == 'drawer' %}true{% else %}false{% endif %}
}
{%- endcapture -%}
{%- if block.settings.inventory_quantity_threshold == 0 -%}
{{- 'product.form.inventory_quantity_count' | t: count: product.selected_or_first_available_variant.inventory_quantity -}}
{%- else -%}
{{- 'product.form.low_inventory_quantity_count' | t: count: product.selected_or_first_available_variant.inventory_quantity -}}
{%- endif -%}
{{- nav_item_badge -}}
{%- else -%}
{{- nav_item_badge -}}
{%- endif -%}
{%- endfor -%}
{{ buy_it_with_block.settings.title | escape }}