I am trying to solve a issue with a XML feed for a platform. I am trying to get the availability and product type of products but I get this error in https://validator.w3.org/ : Undefined item element: g:availability
The code I wrote is this:
<item><g:id>{{product.id}}</g:id><title><![CDATA[{{ product.title | strip_html | strip_newlines | escape | replace: 'amp;', 'and' | replace: '&', 'and' | replace: "é", "e" | replace: "Ã", "a" }}]]></title><description>{{ productDescription | strip_html | strip_newlines | replace: '&', '&' }}</description><g:product_type>{{ product.type }}</g:product_type><g:condition>New</g:condition><link>{{shop.url}}{{product.url}}</link><g:image_link>https:{{product.featured_image | product_img_url: 'large'}}</g:image_link><g:availability>{% if current_variant.available %}in stock{% else %}out of stock{% endif %}</g:availability><g:price>{{ product.price | divided_by: 100.00 }} RON</g:price><g:brand>{{product.vendor | escape }}</g:brand></item>
And this is the attribute for availability:
<link itemprop="availability" href="http://schema.org/{% if current_variant.available %}InStock{% else %}OutOfStock{% endif %}">
How to get this right by the XML feed? Thank you