pre-order

{% comment %}
The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}

{% section 'product-pre-order-template' %}

<script>
// Override default values of shop.strings for each template.
// Alternate product templates can change values of
// add to cart button, sold out, and unavailable states here.
theme.productStrings = {
addToCart: {{ 'products.product.add_to_cart' | t | json }},
soldOut: {{ 'products.product.sold_out' | t | json }},
unavailable: {{ 'products.product.unavailable' | t | json }}
}
</script>

{% assign current_variant = product.selected_or_first_available_variant %}

<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "{{ product.title | escape }}",
"url": "{{ shop.url }}{{ product.url }}",
{%- if product.featured_image -%}
{%- assign image_size = product.featured_image.width | append: 'x' -%}
"image": [
"https:{{ product.featured_image.src | img_url: image_size }}"
],
{%- endif -%}
"description": "{{ product.description | strip_html | escape }}",
{%- if current_variant.sku != blank -%}
"sku": "{{ current_variant.sku }}",
{%- endif -%}
"brand": {
"@type": "Thing",
"name": "{{ product.vendor | escape }}"
},
"offers": [
{%- for variant in product.variants -%}
{
"@type" : "Offer",
{%- if variant.sku != blank -%}
"sku": "{{ variant.sku }}",
{%- endif -%}
"availability" : "http://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}",
"price" : "{{ variant.price | divided_by: 100.00 }}",
"priceCurrency" : "{{ cart.currency.iso_code }}",
"url" : "{{ shop.url }}{{ variant.url }}"
}{% unless forloop.last %},{% endunless %}
{%- endfor -%}
]
}
</script>