跳至內容
選單
此問題已被標幟
4015 瀏覽次數

In Odoo 10 I am facing an issue with meta property og:image. It is not loading a correct image for the product. 

Eg: if product id is 100

and suggested product id is 50.

og image url rendered as web/image/product.template/50/image

It should be web/image/product.template/100/image

here is website_sale.product view related code.
                <t t-set="head">
<!-- Facebook and linkedin sharing data -->
<meta property="og:type" content="website"/>
<meta property="og:url" t-att-content="request.httprequest.url"/>
<meta property="og:image" t-attf-content="#{request.httprequest.url_root}web/image/product.template/#{product.id}/image"/>
<meta property="og:description" t-att-content="product.description_sale"/>
<!-- Twitter sharing data -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" t-attf-content="@#{res_company.name}"/>
<meta name="twitter:title" t-att-content="product.name"/>
<meta name="twitter:description" t-att-content="product.description_sale"/>
<meta name="twitter:image" t-attf-content="#{request.httprequest.url_root}web/image/product.template/#{product.id}/image"/>
                </t>

頭像
捨棄
作者

Any help?

相關帖文 回覆 瀏覽次數 活動
1
9月 22
5417
2
9月 22
12476
1
3月 17
8227
1
9月 15
8124
1
3月 15
5340