Due to the Good Friday holiday, many of our employees are taking time off to be with their friends and family.
Please allow for a slower than normal response time. If you have a site issue that needs immediate attention, please submit a site down ticket as these always get priority.

Google looking for new value in Availability structured data

Modified on Thu, 15 Aug 2019 at 10:45 AM

Google recently changed the accepted values for the 'availability' structured data itemprop ("InStock" rather than "In Stock"), potentially causing errors to be reported by Google. That can easily be fixed by locating the xml packages you are using, and edit them in a text editor such as Notepad++ (free download online)


How do you tell if you’re 'broken' (if you haven't received a notification from Google) and how to verify that your fix is in place?

There's a schema.org validation tool HERE

Just copy/paste a product page from your site into the URL field and RUN TEST. Review the results to verify any issues.


1) Identify the product xml packages you use. We have identified a few xml packages with this issue: product.tabbed-responsive.xml.config and product.variants-in-list.xml.config


2) Copy the files locally, create a backup of them, then Edit the file and search for all instances of:


<link itemprop="availability" href="{concat(aspdnsf:GetCurrentProtocol(), '://schema.org/', substring-before($stockStatusText, '|'))}" content="{substring-after($stockStatusText, '|')}"/>


3) Replace with this (drop the content parameter):


<link itemprop="availability" href="{concat(aspdnsf:GetCurrentProtocol(), '://schema.org/', substring-before($stockStatusText, '|'))}" />


4) Save the xml package back to your site in the same place (overwrite existing)


NOTES:

- If unsure what xml packages you are using, run the following sql (copy/paste) in your site admin Configuration - Run SQL window and Submit (once). Then access your Reports - Custom Reports - Product XmlPackages - then Save Excel Export button, then review the results in Excel by sorting on the XmlPackage column (C), A-Z and review which xml packages are listed.


INSERT INTO CustomReport (Name, Description, SQLCommand)

VALUES ('Product XmlPackages', 'Product XmlPackages', 'SELECT ProductID,Name,XmlPackage FROM Product')


- The xml package files will be in your site FTP. Look first in the proper skins/skin_#/xmlpackages folder, and if not found, copy them from the root /XmlPackages folder into your skins/skin_#/xmlpackages folder, and then edit them there as above. You should always keep the original xml packages in the root XmlPackages folder, and only modify copies in your skin folder. The site will always look first in the skin folder for xml packages.


- If you cannot locate the code value in step 2 above within the xmlpackage file, then that package is not likely producing the wrong value, and you can skip the edit above. Use the structured data validation tool to verify the output on a product page.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article