如何为Opencart正确设置schema.org

如何为Opencart正确设置schema.org,opencart,schema.org,Opencart,Schema.org,我发现“availability”:“{stock | striptags}}”,返回Opencart中的转换值,这是无效的 -Msg from GSC->>字段“availability”中的枚举值无效我可能没有正确阅读问题,但是如果数据来自OpenCart编码,那么您可以尝试在数据到达模板之前对其进行解码(使用html_entity_decode),或者在模板内通过修改细枝来访问html_entity_decode(此处解释:).否,问题是schema.org设置Opencart 3x &l

我发现“availability”:“{stock | striptags}}”,返回Opencart中的转换值,这是无效的
-Msg from GSC->>字段“availability”中的枚举值无效我可能没有正确阅读问题,但是如果数据来自OpenCart编码,那么您可以尝试在数据到达模板之前对其进行解码(使用html_entity_decode),或者在模板内通过修改细枝来访问html_entity_decode(此处解释:).

否,问题是schema.org设置Opencart 3x
<script type="application/ld+json">
{
  "@context":         "http://schema.org/",
  "@type":            "Product",
  "url" :               "{{ base }}",
  "name":             "{{ heading_title }}",
  "image":            "{{ thumb }}",
  "description":      "{{ description|striptags|slice(0, 200) }}",
  {% if tbData.common['manufacturers_enabled'] and manufacturer %}
  "brand":{
    "@type":          "Thing",
    "name":           "{{ manufacturer }}"
  },
  {% endif %}
  {% if rating %}
  "aggregateRating":{
    "@type":          "AggregateRating",
    "ratingValue":    "{{ rating }}",
    "reviewCount":    "{{ reviews|number_format }}"
  },
  {% endif %}
  "offers":{`enter code here`enter code here`
    "@type":          "Offer",
    "priceCurrency":  "{{ tbData.currency_code }}",
    {% if not special %}
    "price":          "{{ product_info.price_num }}",
    {% else %}
    "price":          "{{ product_info.special_num }}",
    {% endif %}
        "availability":   "{{ stock|striptags }}",
    "seller":{
      "@type":        "Organization",
      "name":         "{{ product_info['store_name'] }}"
    }
  }
}
</script>