Shopify themes, liquid, logos, and UX
Hi! I noticed this is a new thing that Google has added to structured data. How can I add it to my site?
Solved! Go to the solution
This is an accepted solution.
Hey @limelight91
Adding the return policy and shipping information into your structured data is really difficult mainly because it's not available in Shopify and the shipping information varies based on the customers location.
The best thing to do is to ensure you have the unique product identifiers in your structured data (e.g. GTIN - called barcode in Shopify, MPN and Brand) so that Merchant Center can validate the product feed with your structured data and what's visually on the page. Merchant Center will then use whatever your shipping and returns information is in Merchant Center to populate the shipping and returns information into Rich Results.
If you have these fields set up, you can ignore the warning in Search Console. Otherwise, you can install an app like JSON-LD for SEO that will include the unique product identifiers in the structured data so that your data connect with Merchant Center.
This article explains it a bit more in detail: https://www.ilanadavis.com/blogs/articles/search-console-includes-shipping-returns-for-merchant-list...
If you're not sure, I'd be happy to do a free structured data audit for your store. Feel free to email me at support@ilanadavis.com.
This is an accepted solution.
Hey @limelight91
Adding the return policy and shipping information into your structured data is really difficult mainly because it's not available in Shopify and the shipping information varies based on the customers location.
The best thing to do is to ensure you have the unique product identifiers in your structured data (e.g. GTIN - called barcode in Shopify, MPN and Brand) so that Merchant Center can validate the product feed with your structured data and what's visually on the page. Merchant Center will then use whatever your shipping and returns information is in Merchant Center to populate the shipping and returns information into Rich Results.
If you have these fields set up, you can ignore the warning in Search Console. Otherwise, you can install an app like JSON-LD for SEO that will include the unique product identifiers in the structured data so that your data connect with Merchant Center.
This article explains it a bit more in detail: https://www.ilanadavis.com/blogs/articles/search-console-includes-shipping-returns-for-merchant-list...
If you're not sure, I'd be happy to do a free structured data audit for your store. Feel free to email me at support@ilanadavis.com.
thank you very much for your thorough reply!
This was very helpful! Thank you for sharing!
I'm having a problem with this as well and I have eliminated most of the errors that google is throwing, it keeps telling me that I'm missing a comma or bracket with this though and I can't figure it out. I've looked over the code a dozen times and I just can't find the problem. I see no missing commas and all of the brackets seem to be doing their jobs. Can someone please scan over this code and tell me where the problem is? I sell a digital product so once they have it they have it, returns aren't really a thing that can be done, hence the no returns. Any help would be really appreciated.
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": {{ product.title | json }},
"url": {{ shop.url | append: product.url | json }},
{%- if product.featured_image -%}
{%- assign image_size = product.featured_image.width | append: 'x' -%}
"image": [
{{ product.featured_image.src | img_url: image_size | prepend: "https:" | json }}
],
{%- endif -%}
"description": {{ product.description | strip_html | json }},
{%- if current_variant.sku != blank -%}
"sku": {{ current_variant.sku | json }},
{%- endif -%}
"brand": {
"@type": "Thing",
"name": {{ product.vendor | json }}
},
"offers": [
{%- for variant in product.variants -%}
{
"@type" : "Offer",
{%- if variant.sku != blank -%}
"sku": {{ variant.sku | json }},
{%- endif -%}
"availability" : "http://schema.org/{% if variant.available %}InStock{% else %}OutOfStock{% endif %}",
"price" : {{ variant.price | divided_by: 100.00 | json }},
"priceCurrency" : {{ cart.currency.iso_code | json }},
"url" : {{ shop.url | append: variant.url | json }},
{% unless forloop.last %},{% endunless %}
{%- endfor -%}
"hasMerchantReturnPolicy" :
{ "@type" : "MerchantReturnPolicy",
"applicableCountry" : "AU,DE,DK,HK,JP,NZ,SE,SG,UK,US",
"merchantReturnLink" : "https://tattoodesigns.store/pages/terms-of-service",
"returnPolicyCategory" : "https://schema.org/MerchantReturnNotPermitted"
}
]
}
</script>
So I made some changes and ran it through the schema code validator and it came up clean, I am now getting a totally different error. How can google say that something is wrong if the organization that makes the code says that it's right. I don't get it, I am now getting a "Missing '}' or object member name" error with this code:
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": {{ product.title | json }},
"url": {{ shop.url | append: product.url | json }},
{%- if product.featured_image -%}
{%- assign image_size = product.featured_image.width | append: 'x' -%}
"image": [
{{ product.featured_image.src | img_url: image_size | prepend: "https:" | json }} ],
{%- endif -%}
"description": {{ product.description | strip_html | json }},
{%- if current_variant.sku != blank -%}
"sku": {{ current_variant.sku | json }},
{%- endif -%}
"brand": {
"@type": "Thing",
"name": {{ product.vendor | json }}
},
"offers": [
{%- for variant in product.variants -%}
{ "@type" : "Offer",
{%- if variant.sku != blank -%}
"sku": {{ variant.sku | json }},
{%- endif -%}
"availability" : "http://schema.org/{% if variant.available %}InStock{% else %}OutOfStock{% endif %}",
"price" : {{ variant.price | divided_by: 100.00 | json }},
"priceCurrency" : {{ cart.currency.iso_code | json }},
"url" : {{ shop.url | append: variant.url | json }},
{% unless forloop.last %},{% endunless %}
{%- endfor -%}
]
"hasMerchantReturnPolicy": [
{ "@type" : "MerchantReturnPolicy",
"applicableCountry" : "AU,DE,DK,HK,JP,NZ,SE,SG,UK,US",
"merchantReturnLink" : "https://tattoodesigns.store/pages/terms-of-service",
"returnPolicyCategory" : "https://schema.org/MerchantReturnNotPermitted" }
]
}
</script>
figured it out, thanks anyway 🙂 I had unneeded brackets and was missing a comma, syntax is rough, hehehe
Hello, for people who would like to know how to fix the error about Missing } or object member name : add a coma , at the end of the ] before the line with hasMerchantReturnPolicy
Hey! This app allows to add Shipping methods schema: https://apps.shopify.com/seo-schema-for-products-1
Hey Sofiia, thanks for the tip, trying this out right now.
EDIT: App looks solid, but there are some minor issues regarding special characters. I have just now sent you an email about this.
Hello! Thank you so much for your email! I am happy to cooperate with you and make the necessary improvements. I have just answered your email.
The issue was resolved within hours. GREAT support! 🙂
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025