Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
4011 Visualizações

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>

Avatar
Cancelar
Autor

Any help?

Publicações relacionadas Respostas Visualizações Atividade
1
set. 22
5417
2
set. 22
12476
1
mar. 17
8227
1
set. 15
8124
1
mar. 15
5340