-
-
Save blueprintmrk/ad4b49a2d7998377340036c3761d2a6c to your computer and use it in GitHub Desktop.
Example of Structured Data for Shopify Product
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign current_variant = product.selected_or_first_available_variant %} | |
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org/", | |
"@type": "Product", | |
"@id": "{{ shop.url | append: '/products/' | append: product.handle }}", | |
"url": "{{ shop.url | append: '/products/' | append: product.handle }}", | |
"name": "{{ product.title }}", | |
"image": "{{ product.featured_image.src | img_url: 'master' }}", | |
"description": "{{ product.description | strip_html | escape }}", | |
"brand": { | |
"name": "{{ product.vendor }}" | |
}, | |
"offers": { | |
"@type": "Offer", | |
"priceCurrency": "{{ shop.currency }}", | |
"price": "{{ current_variant.price | money_without_currency }}", | |
"availability": "http://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}", | |
"seller": { | |
"@type": "Organization", | |
"name": "{{ shop.name }}" | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment