0

Im trying to add gmail markups to the top of the order confirmation email like showed in the picture

enter image description here

I tried using the gmail provided markup code:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Order",
  "merchant": {
    "@type": "Organization",
    "name": "Amazon.com"
  },
  "orderNumber": "123-4567890-1234567",
  "priceCurrency": "USD",
  "price": "29.99",
  "acceptedOffer": {
    "@type": "Offer",
    "itemOffered": {
      "@type": "Product",
      "name": "Google Chromecast"
    },
    "price": "29.99",
    "priceCurrency": "USD",
    "eligibleQuantity": {
      "@type": "QuantitativeValue",
      "value": "1"
    }
  }
}
</script>

But with no luck.

Im using a docker with magento 2 and mailhog (locally). Mailhog recieves the order mail. The script exists in the <head> part (with inspect element) but does not get rendeded.

Also tried to sned that exact code using gmail.com to myself - it does not get rendered either.

What im missing?

Lith
  • 1,251
  • 6
  • 19
  • The subject here is "Order confirmation". You want part of the email above that? Impossible. However, the example that you show does not do that. Do you want to know how to recreate this email? – Nathan Sep 29 '21 at 22:06
  • @Nathan yes I do. Since The post i learned its called "Markup" yet I still fail to create it using mailhog and magento 2 order with the use of this code in `` https://developers.google.com/gmail/markup/reference/order#basic_order – Lith Sep 30 '21 at 07:10
  • It is possible to do that but you can not send it `using gmail.com to myself`. You will need an ESP that does not strip out script from your email. You can test it using [putsmail](https://putsmail.com/) or something similar. – Syfer Sep 30 '21 at 13:52

0 Answers0