İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How to disable "Add to Cart" button in E-commerce product page in Odoo 12?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
ecommerceodoo12
5 Cevaplar
17010 Görünümler
Avatar
Ed Lo

Dear all,

I am trying to use the Odoo 12 E-commerce function as an online catalog so I would like to disable "Add to Cart" button while I cannot disable it in product page.

I tried to delete the line:
<a role="button" id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a>
 in XML Product, but it does not allow me to save, which showing this error: 

Server error

A server error occured. Please check you correctly signed in and that the file you are saving is correctly formatted.
[object Object] 

There are some modules for older versions but I cannot use them in version 12.

Thanks in advance.

0
Avatar
Vazgeç
Avatar
Anisha Bahukhandi
En İyi Yanıt

Hello,

You can disable the "Add to Cart" button in E-commerce product page in Odoo 12V easily.

To configure it from frontend follow the following steps:

  1. Go to the Odoo Website Product Page then click on HTML/CSS Editor under the Customize Tab.
  2. You need to remove or comment the following HTML/CSS Code

<a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a>

For more information refer to the screenshot,

You can also disable it from Odoo Backend; you need to follow the below-mentioned steps:

  1. Open the Odoo and click on the Settings menu. Here, click on Activate the Developer Mode. Even, one can also activate the developer mode by typing ‘debug=1’ after ‘web?’ in the URL.
  2. Go to the 'Views' menu under 'Technical settings'
  3. Now, search for the 'Product'. It is a QWeb template for the product page in website_sale module. For more information refer screenshot-2,
  4. Open the product template and comment or remove the same line mentioned above (<a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a>)

Please Note: The Add to Cart will be disabled only till you do not update the Website Module.

If you want to make the changes permanently then you have to do the same changes in website_sale Module.

If you have any issues/queries then, please https://webkul.uvdesk.com/en/customer/create-ticket/

For any doubt contact us at support@webkul.com 

https://prnt.sc/qgfufx

https://prnt.sc/qgfz7u 

7
Avatar
Vazgeç
Avatar
Adrian M. Padilla
En İyi Yanıt

@Ed can you please share the exact language you used please? im a beginner and im trying to do the same for my website. I would also like to eliminate showing the price, could you help me?

0
Avatar
Vazgeç
Avatar
amelsalah27@gmail.com
En İyi Yanıt


add below code to your module :


    
   


user_id.partner_id.name == 'Public user'" id="add_to_cart" class="btn btn-primary btn-lg mt16 js_check_product a-submit d-block d-sm-inline-block" href="#">Add to Cart


0
Avatar
Vazgeç
Avatar
Paresh Wagh
En İyi Yanıt

Hi Ed:

You can add a hidden attribute to the <a> tag like so to hide the button:

<a role="button" id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" hidden href="#">Add to Cart</a>

However, the way you are trying to do it is not the recommended way. You can lose your changes during an update if you do it this way. Odoo has a set of customization guidelines that need to be followed for enhancing the core functionality of the system. For example, in this case, you need to use View Inheritance to add the hidden attribute to the <a> tag. The following link explains the concepts involved:

View inheritance

0
Avatar
Vazgeç
Avatar
Ed Lo
Üretici En İyi Yanıt

Hi Paresh,

Thank you very much for your help. I added  style="visibility:hidden;" in the <a> tag and the Add to Cart button is now hidden. I will look into the View inheritance later.

Best regards,
Ed

0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
when adding product to cart while accessing site with www I get catr is empty!
ecommerce odoo12
Avatar
0
Haz 20
3004
How to add a new Payment Acquirers in Odoo12 eCommerce Çözüldü
ecommerce odoo12
Avatar
Avatar
5
May 20
5149
What DB type to select for Odoo optimization?
xmlrpc ecommerce odoo12
Avatar
Avatar
1
Kas 25
4859
AttributeError: 'NoneType' object has no attribute '_get_first_possible_combination'
ecommerce cart odoo12
Avatar
0
Eki 22
659
My Cart menu doesn't show up
ecommerce cart odoo12
Avatar
0
Eki 22
379
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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