コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4024 ビュー

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
5418
2
9月 22
12482
1
3月 17
8230
1
9月 15
8130
1
3月 15
5364