Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

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

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
ecommerceodoo12
5 Odpowiedzi
17007 Widoki
Awatar
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
Awatar
Odrzuć
Awatar
Anisha Bahukhandi
Najlepsza odpowiedź

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
Awatar
Odrzuć
Awatar
Adrian M. Padilla
Najlepsza odpowiedź

@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
Awatar
Odrzuć
Awatar
amelsalah27@gmail.com
Najlepsza odpowiedź


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
Awatar
Odrzuć
Awatar
Paresh Wagh
Najlepsza odpowiedź

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
Awatar
Odrzuć
Awatar
Ed Lo
Autor Najlepsza odpowiedź

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
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
when adding product to cart while accessing site with www I get catr is empty!
ecommerce odoo12
Awatar
0
cze 20
3004
How to add a new Payment Acquirers in Odoo12 eCommerce Rozwiązane
ecommerce odoo12
Awatar
Awatar
5
maj 20
5147
What DB type to select for Odoo optimization?
xmlrpc ecommerce odoo12
Awatar
Awatar
1
lis 25
4856
AttributeError: 'NoneType' object has no attribute '_get_first_possible_combination'
ecommerce cart odoo12
Awatar
0
paź 22
659
My Cart menu doesn't show up
ecommerce cart odoo12
Awatar
0
paź 22
379
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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