Missing field "shippingDetails" (in "offers")

PoojaHiwade
Excursionist
26 0 10

Any one help how to solve this issue from merchant center?

 

Capture-667.PNG

Replies 9 (9)
petecube
Tourist
4 0 3

I just got the same problem. I think it is to do with merchant centre?

JJL
Excursionist
22 0 21

Yes, same thing here too. Any ideas anyone?

frogandtoad
Shopify Partner
29 0 22

You'll likely have to add or edit structured data in your product.liquid code. More information here - https://developers.google.com/search/docs/appearance/structured-data/product

 

This fixed the issue for me.

I can help you with:
Google Merchant Center Errors
GA4 Migration
Technical SEO / On-page SEO
Website Performance
Skellytones
Tourist
7 0 0

Where did you put the code off the link you posted? I tried to add it to the product.json page, I even tried custom meta fields.

frogandtoad
Shopify Partner
29 0 22

The place to add this will be in product.liquid under 'offers'. 

 

The liquid file outputs information about the product being viewed, no matter which product is being viewed. Google looks through this data to understand the variables about each product and if a variable is missing or doesn't translate exactly between Shopify and Google, you get the error.

 

The error message Missing Field "ShippingDetails" (In "Offers") is literally telling us that in the product.liquid file, under 'offers' there are no shipping details defined. 

 

Please send me a private message if you'd like more help.

I can help you with:
Google Merchant Center Errors
GA4 Migration
Technical SEO / On-page SEO
Website Performance
Skellytones
Tourist
7 0 0

I don't seem to have a product.liquid but I do have a main-product.liquid so I assumed it was in there. 

 

I added the following code in the offers code and google is still saying there's a problem when I hit validate fix. 

 

<script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
  "name": {{ product.title | json }},
  "url": {{ request.origin | append: product.url | json }},
  {% if seo_media -%}
    "image": [
      {{ seo_media | image_url: width: 1920 | prepend: "https:" | json }}
    ],
  {%- endif %}
  "description": {{ product.description | strip_html | json }},
  {% if product.selected_or_first_available_variant.sku != blank -%}
    "sku": {{ product.selected_or_first_available_variant.sku | json }},
  {%- endif %}
  "brand": {
    "@type": "Brand",
    "name": {{ product.vendor | json }}
  },
  "offers": [
    {%- for variant in product.variants -%}
      {
        "@type" : "Offer",
        {%- if variant.sku != blank -%}
          "sku": {{ variant.sku | json }},
        {%- endif -%}
        {%- if variant.barcode.size == 12 -%}
          "gtin12": {{ variant.barcode }},
        {%- endif -%}
        {%- if variant.barcode.size == 13 -%}
          "gtin13": {{ variant.barcode }},
        {%- endif -%}
        {%- if variant.barcode.size == 14 -%}
          "gtin14": {{ variant.barcode }},
        {%- 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" : {{ request.origin | append: variant.url | json }},
        "shippingDetails": {
          "@type": "OfferShippingDetails",
          "shippingRate": {
            "@type": "MonetaryAmount",
            "value": "0",
            "currency": "GBP"
          },
          "shippingDestination": [
            {
              "@type": "DefinedRegion",
              "addressCountry": "UK",
              "addressRegion": ["UK"]
            }
          ]
        },
        "hasMerchantReturnPolicy": {
          "@type": "MerchantReturnPolicy",
          "applicableCountry": "UK",
          "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
          "merchantReturnDays": 14,
          "returnMethod": "https://schema.org/ReturnByMail",
          "returnFees": "https://schema.org/ReturnFeesCustomerResponsibility"
        }
      }{% unless forloop.last %},{% endunless %}
    {%- endfor -%}
  ]
}
</script>

The only thing I have changed is the Shipping details and returns policy. 

frogandtoad
Shopify Partner
29 0 22

Anyone still needing help with this issue please private message me. Thanks!

I can help you with:
Google Merchant Center Errors
GA4 Migration
Technical SEO / On-page SEO
Website Performance
Sereias
Visitor
1 0 0

Hi,

 

I'm having the same issue for about a month now...cant fix it. 

Can you please help me?

Thanks in advance!

 

 

Sereias_0-1685140220292.png

 

DutchRuler
Visitor
1 0 0

It was a bit of a search for me, but for my template the json-ld was specified in

microdata-schema.liquid

 

I ended up adding the following to the script

 

"shippingDetails": {
"@type": "ShippingDetails",
"shippingRate": {
"@type": "MonetaryAmount",
"value": "{% if cart.total_price < 2000 %}3.99{% else %}0{% endif %}", // 2000 is in cents, which is equivalent to 20 euros
"currency": "{{ cart.currency.iso_code }}"
},
"deliveryTime": {
"@type": "ShippingDeliveryTime",
"businessDays": {
"@type": "BusinessDays",
"dayOfWeek": [
"http://schema.org/Monday",
"http://schema.org/Tuesday",
"http://schema.org/Wednesday",
"http://schema.org/Thursday",
"http://schema.org/Friday"
// Add or remove days as per your shipping days
],
"cutoffTime": "15:00:00Z" // Adjust based on your operations
}
}