Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

How to implement facebook open graph on my product page?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
graphimplementationopenfacebook
2 Replies
13653 Tampilan
Avatar
Pascal Tremblay

Hello all,

I'm searching the right way to implement Facebook open graph meta tag on the product page of my shop on the front-end. 

Somebody has successfully done it?

Would you have some tips?

Thanks


UPDATE #1

For example, I would search an example on how to fill dynamically those <meta> in a page like this product page : http://intimeetvilain.com/shop_iv/product/advanced-waterproof-jack-rabbit-1850

    <template id="website_lapagept.facebook_open_graph_tags_iv">

        <meta property="og:title" content="" />

        <meta property="og:description" content="" />

        <meta property="og:url" content="" />

        <meta property="og:image" content="" />

    </template>


UPDATE #2

When I inspect the source code on this page you are reading, I see that all the open graph <meta> are well filled. Where could I find the code to do the same thing on my odoo?


UPDATE #3

When we click on the « share » button just below, four buttons appear. How could I implement those 4 buttons myself on my odoo? Where is the code?

1
Avatar
Buang
Emipro Technologies Pvt. Ltd.

What do you mean by Facebook Open Graph ? Is it means that you want to add a button of Facebook to share that product page into Facebook ? In this link (https://www.odoo.com/blog/odoo-news-5/post/top-apps-themes-in-odoo-store-314) there is 4 buttons ....Please confirm that do you want exactly like that ?

Avatar
Pascal Tremblay
Penulis Jawaban Terbai

Here is our answer. We have found it in the Odoo 9 code. It is surely not the best code, but it works for our needs at this moment. Thanks

<?xml version="1.0" encoding="utf-8"?>

        <openerp>

                <data>

                        <template id="website_lapagept.website_layout_iv" name="Main layout - IV">&lt;!DOCTYPE html&gt;

                                <html t-att-lang="lang and lang.replace('_', '-')"

                                        t-att-data-website-id="website.id if editable and website else None"

                                        t-att-data-editable="'1' if editable else None"

                                        t-att-data-translatable="'1' if translatable else None"

                                        t-att-data-view-xmlid="xmlid if editable else None"

                                        t-att-data-main-object="repr(main_object) if editable else None"

                                        t-att-data-oe-company-name="res_company.name">

                            <head>

                                    <meta charset="utf-8" />

                                    <t t-if="main_object and 'website_meta_title' in main_object and not title">

                                            <t t-set="title" t-value="main_object.website_meta_title"/>

                                    </t>

                                    <t t-if="main_object and 'name' in main_object and not title and not additional_title">

                                            <t t-set="additional_title" t-value="main_object.name"/>

                                    </t>

                                    <t t-if="not title">

                                            <t t-set="title"><t t-if="additional_title"><t t-raw="additional_title"/> | </t><t t-esc="(website or res_company).name"/></t>

                                    </t>

                                    <meta name="viewport" content="initial-scale=1"/>

                                    <meta name="description" t-att-content="main_object and 'website_meta_description' in main_object

and main_object.website_meta_description or website_meta_description"/>

                                    <meta name="keywords" t-att-content="main_object and 'website_meta_keywords' in main_object

and main_object.website_meta_keywords or website_meta_keywords"/>

                                    <meta name="generator" content="Odoo"/>

                        <!-- OpenGraph tags for Facebook sharing -->

                        <meta property="og:title" t-att-content="additional_title" />

                        <meta property="og:site_name" t-att-content="res_company.name" />

                        <meta property='og:url' t-att-content="request.httprequest.url_root+request.httprequest.path[1:end]"/>

                        <!-- OpenGraph pour le forum -->

                        <t t-if="main_object and 'plain_content' in main_object and main_object.plain_content">

                                <t t-set="og_description" t-value="main_object.plain_content[0:500]"/>

                                <meta property="og:description" t-att-content="og_description" />

                                <meta property='og:image' t-att-content="request.httprequest.url_root+'logo.png'"/>

                        </t>

                        <!-- OpenGraph pour les produits avec une description de vente -->

                        <t t-if="main_object and 'description_sale' in main_object and main_object.description_sale">

                                <t t-set="og_description_sale" t-value="main_object.description_sale"/>

                                <meta property="og:description" t-att-content="og_description_sale" />

                        </t>

                        <!-- OpenGraph pour les produits sans description de vente mais une description -->

                        <t t-if="main_object and not 'description_sale' and 'description' in main_object and main_object.description and not main_object.description_sale">

                                 <t t-set="og_description" t-value="main_object.description"/>

                                 <meta property="og:description" t-att-content="og_description" />

                        </t>

                        <!-- OpenGraph pour les images de produits -->

                        <t t-if="main_object and 'image' in main_object">

                                <meta property='og:image' t-att-content="request.httprequest.host_url+website.image_url(product, 'image_big', None if product_image_big else '300x300')" />

                        </t>

2
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
How to fill dynamically those open graph meta tag? Diselesaikan
graph open facebook
Avatar
1
Sep 22
6175
How to add Facebook Open Graph Tag in the <head> section? Diselesaikan
graph open facebook markup
Avatar
Avatar
1
Mar 17
8973
What is the xpath selector to get facebook open graph tag in my <head> section? Diselesaikan
graph xpath open facebook
Avatar
1
Sep 15
8867
How to fill correctly my « og:image » tag in my product page with « suggested products »? Diselesaikan
graph products open facebook suggested
Avatar
1
Nov 15
6283
In Odoo 10 og:image for facebook is not working correctly and loading image from last product of suggested product.
image graph facebook
Avatar
0
Jan 18
4637
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now