Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4014 Представления

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?

Related Posts Ответы Просмотры Активность
1
сент. 22
5417
2
сент. 22
12476
1
мар. 17
8227
1
сент. 15
8124
1
мар. 15
5340