İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
5938 Görünümler

Hi there,

I am trying to add a JSON-LD (for more information https://developers.google.com/search/docs/guides/intro-structured-data and https://schema.org/ ) in my product template in a way that the content of the snippet is filled with odoo variables. That way i just put this JSON-LD in the template and it will be filled automatically for each product. A template/example for the JSON-LD for a product could be:

<script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
  "name": "Executive Anvil",
  "image": "http://www.example.com/anvil_executive.jpg",
  "description": "Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height.",
  "mpn": "925872",
  "brand": {
    "@type": "Thing",
    "name": "ACME"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.4",
    "reviewCount": "89"
  },
  "offers": {
    "@type": "Offer",
    "priceCurrency": "USD",
    "price": "119.99",
    "priceValidUntil": "2020-11-05",
    "itemCondition": "http://schema.org/UsedCondition",
    "availability": "http://schema.org/InStock",
    "seller": {
      "@type": "Organization",
      "name": "Executive Objects"
    }
  }
}
</script>

I was thinking for example putting what appear in the example as  "name": "Executive Anvil", changing it for "name":"product.name". Not sure if that is the correct notation or if that would even work. Anybody has some insight about how to implement this?

Thanks in advance,

Pablo

Avatar
Vazgeç
En İyi Yanıt

Hi Pablo,

i'm thinking about the same. Do you try: t-field="product.name" ?

regards.

gezorro

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Eki 24
626
0
Kas 23
1054
6
Haz 19
12061
0
Eki 18
3083
4
Oca 23
9836