Implement ‘Contact for Pricing’
Managing Odoo Zero Price Products effectively is a common challenge for many businesses using Odoo for their e-commerce platform. You might offer configurable products, services requiring custom quotes, or items with prices that fluctuate too often to list directly. Instead of displaying a confusing “$0.00” price and potentially allowing customers to order items for free, a much better approach is to hide the “Add to Cart” button and instead prompt users to “Contact Us for Pricing.” This tutorial will guide you, step-by-step, on how to configure your Odoo website to handle these Odoo Zero Price Products professionally, ensuring clarity for your customers and generating valuable leads for your sales team. We will explore Odoo’s built-in features and delve into customizations, inspired by techniques shown in tutorials like the one in the provided file, to achieve a seamless user experience.
Why Managing Odoo Zero Price Products is Crucial
Effectively handling Odoo Zero Price Products is not just about avoiding accidental free orders; it’s a strategic part of your sales and customer relationship management. Firstly, it prevents the confusion and potential financial loss that can arise if a customer manages to check out an item listed at $0.00. Secondly, for products or services that genuinely require a custom quotation (like bespoke items, bulk orders, or complex services), prompting a “Contact Us” interaction is the first step in your sales funnel. Consequently, this approach transforms a potentially problematic product listing into a lead generation opportunity. Furthermore, it enhances your brand’s professional image by clearly communicating that some offerings require personalized attention, rather than appearing to give items away or having incomplete listings. Ultimately, a well-thought-out strategy for Odoo Zero Price Products streamlines the inquiry process for these specific items, making it easier for both your team and your potential customers.
Understanding Odoo’s Default Behavior for Priceless Products
By default, Odoo’s behavior with products set to a zero price can vary depending on specific configurations and versions. However, in many standard setups, if a product’s price is $0.00, the system might still display an “Add to Cart” button. This, quite obviously, presents a significant risk. Customers could mistakenly (or intentionally) add these items to their cart and proceed to checkout, expecting to receive them for free. This can lead to awkward customer service interactions, order cancellations, and even financial loss if such orders slip through unnoticed. Therefore, relying on the default behavior for Odoo Zero Price Products is generally not advisable for businesses that list such items on their e-commerce storefront. Recognizing this potential pitfall is the first step towards implementing a more robust solution.
Step-by-Step: Enabling “Contact Us for Pricing” for Odoo Zero Price Items
Fortunately, Odoo provides mechanisms to better manage Odoo Zero Price Products. The following steps will guide you through the process of hiding the standard purchase options and instead displaying a “Contact Us” prompt. This part of the tutorial focuses on using Odoo’s settings, which can be enhanced with further customizations as we’ll see later.
Prerequisite: Activating Developer Mode in Odoo
Before you can access some of the necessary configuration options and technical views, you must activate Odoo’s developer mode. Developer mode unlocks advanced features and settings that are hidden from regular users to simplify the interface.
To activate developer mode:
- Navigate to the Settings app in your Odoo dashboard.
- Scroll down to the bottom of the General Settings page.
- Under the “Developer Tools” section (or similar, depending on your Odoo version), click on “Activate the developer mode” or “Activate the developer mode (with assets)”.
- You will know developer mode is active when you see a bug icon (or a monkey wrench icon in older versions) appear in the top right corner of your Odoo interface.
Activating developer mode is a crucial first step for many Odoo customizations, including the ones we’ll discuss for handling Odoo Zero Price Products.
Navigating to Website Configuration
Once developer mode is active, the next step involves going to your website’s configuration settings. This is where you will find the option to control how zero-price products are handled.
- Go to the Website app.
- In the Website app’s top menu, click on Configuration.
- From the dropdown menu, select Settings.
This will take you to the main settings page for your Odoo website, where various e-commerce and site-wide options are managed.
Enabling the “Prevent Sale of $0 Products” Option
Within the Website settings, Odoo often includes an option specifically designed to manage Odoo Zero Price Products. The video transcript you provided (“Prevent Selling of Zero Price Products on Odoo Website | Show "Contact Us for Pricing" Button #odoo [mwjkMfjZTWU].id.vtt”) highlights such a feature.
- In the Website Settings page, look for an option related to product pricing or sales. This might be labeled as “Prevent Sale of $0 Products,” “Zero Price Products,” or something similar. In the VTT, this is referred to as “mencegah penjualan produk yang harganya nol.”
- Enable this option by checking the box or toggling the switch.
- Save your changes.
Once you enable this setting and save, Odoo’s behavior on the front end for Odoo Zero Price Products will change. Typically:
- The “Add to Cart” button will be hidden or replaced.
- A message like “Not available for sale” or similar might appear.
- Often, a “Contact Us” button is displayed, which, when clicked, can redirect the user to your website’s contact page.
The VTT mentions (around 01:00) that activating this option results in a “hubungi kami” (contact us) button appearing. This built-in feature is a great starting point for managing your Odoo Zero Price Products.
Customizing the Message for Odoo Products Awaiting Pricing
While the default “Not available for sale” message (mentioned in the VTT around 01:28 as “tidak tersedia untuk dijual”) is functional, it might not be the most user-friendly or informative. A clearer message like “Contact us for pricing” or “Request a Quote” can significantly improve the user experience. The VTT (around 01:38) discusses changing this default message. Let’s explore how you can achieve this, which often involves a bit more technical customization.
This typically requires creating a custom Odoo module to:
- Add a new field to your website settings to store your custom message.
- Modify the Odoo website product page template (QWeb) to display this custom message instead of the default one.
The Need for a Custom Informational Message
A generic “not available for sale” message can be ambiguous. Customers might wonder if the product is out of stock, discontinued, or simply not purchasable online. By contrast, a specific message like “Contact us for a custom quote” or “Special pricing available, please inquire” directly tells the customer what to do next and sets the right expectation for these Odoo Zero Price Products. This clarity can significantly increase the likelihood of a customer reaching out.
Technical Steps: Implementing a Custom Message Feature
To implement a fully customizable message for your Odoo Zero Price Products, you’ll generally need to create a small custom Odoo module. This module will contain Python code for the logic and XML code for the views and templates.
1. Define Fields in Python Models:
First, you need to ensure the website model has fields to store the preference and the custom message. Then, you’ll add related fields to res.config.settings to manage these from the Website settings interface.
Create a new file, for example, models/website_extended.py in your custom module:
from odoo import fields, models
class Website(models.Model):
_inherit = ‘website’
prevent_zero_price_sale = fields.Boolean(
string="Prevent Sale of $0 Products & Show Button",
default=False,
help="If checked, products with a price of zero will not be sellable directly. "
"Instead, a 'Contact Us' button and a custom message will be shown."
)
zero_price_product_message = fields.Char(
string="Custom Message for $0 Products",
default="Contact us for pricing",
translate=True, # Allows for multi-language support
help="This message will be displayed on product pages with a price of zero "
"when 'Prevent Sale of $0 Products' is active."
)
Next, create models/res_config_settings_extended.py:
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = ‘res.config.settings’
website_sale_prevent_zero_price = fields.Boolean(
related='website_id.prevent_zero_price_sale',
readonly=False,
string="Activate 'Contact for Price' for $0 Items" # Clearer label for settings
)
website_zero_price_message = fields.Char(
related='website_id.zero_price_product_message',
readonly=False,
string="Display Message for $0 Products"
)
Explanation:
- We inherit the
websitemodel to add two new fields:prevent_zero_price_sale(a boolean to toggle the feature) andzero_price_product_message(a character field for your custom text). - We inherit
res.config.settings(the model behind the settings views) to add fields that arerelatedto the new fields on thewebsitemodel. This allows users to change these settings via the standard Odoo settings interface. Thereadonly=Falseattribute is crucial forrelatedfields inres.config.settingsto make them editable.
2. Add Fields to the Website Settings View (XML):
Now, you need to make these new settings visible in the Website configuration panel. This is similar to what the VTT demonstrates (around 02:15 – 02:49) by inheriting a form view and adding a field.
Create an XML file, for example, views/res_config_settings_views_extended.xml in your custom module:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="res_config_settings_view_form_website_sale_extended" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.website.sale.extended</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='website_settings']//div[hasclass('o_setting_box')][1]" position="after">
<div class="col-12 col-lg-6 o_setting_box" id="website_zero_price_product_settings">
<div class="o_setting_left_pane">
<field name="website_sale_prevent_zero_price"/>
</div>
<div class="o_setting_right_pane">
<label for="website_sale_prevent_zero_price"/>
<div class="text-muted">
Manage display for Odoo zero price products.
</div>
<div class="content-group mt16" attrs="{'invisible': [('website_sale_prevent_zero_price', '=', False)]}">
<div class="row mt16">
<label class="col-lg-4 o_light_label" string="Custom Message" for="website_zero_price_message"/>
<field name="website_zero_price_message" placeholder="e.g., Contact us for pricing"/>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>
Explanation:
- This XML code inherits the existing website settings form view (
website.res_config_settings_view_form). - It uses an
xpathexpression to find a suitable place to insert the new settings block. Theposition="after"attribute places our new settings after an existing settings box. - We add
website_sale_prevent_zero_price(the boolean toggle) andwebsite_zero_price_message(the custom message field). - The
attrs="{'invisible': [('website_sale_prevent_zero_price', '=', False)]}"makes the custom message field visible only when the main feature is enabled. This is good UI practice. - The VTT shows a similar process of adding a field to the settings form view using Odoo’s developer tools to edit the view directly. Creating it in a custom module like this is the more robust and maintainable approach for permanent changes.
3. Modify the Product Page Template (QWeb):
The final step is to modify the QWeb template that displays product information on your website. You need to check if the product price is zero and if your custom feature is enabled. If both are true, you display your custom message and a “Contact Us” button, hiding the standard “Add to Cart” elements.
Create an XML file, for example, views/templates_extended.xml in your custom module:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="product_price_zero_contact_us" inherit_id="website_sale.product_price">
<xpath expr="//div[hasclass('product_price')]" position="attributes">
<attribute name="t-if">product.price != 0 or not website.prevent_zero_price_sale</attribute>
</xpath>
</template>
<template id="product_add_to_cart_zero_contact_us" inherit_id="website_sale.product_add_to_cart">
<xpath expr="//a[@id='add_to_cart']" position="attributes">
<attribute name="t-if">product.price != 0 or not website.prevent_zero_price_sale</attribute>
</xpath>
<xpath expr="//div[@id='o_product_terms_and_share']" position="attributes">
<attribute name="t-if">product.price != 0 or not website.prevent_zero_price_sale</attribute>
</xpath>
</template>
<template id="product_custom_message_zero_price" inherit_id="website_sale.product">
<xpath expr="//section[@id='product_detail']//div[@id='product_details']" position="inside">
<t t-if="product.price == 0 and website.prevent_zero_price_sale">
<div id="o_product_zero_price_message" class="mt16">
<p t-field="website.zero_price_product_message" class="alert alert-info"/>
<a role="button" class="btn btn-primary btn-lg mt16 d-block w-100" t-attf-href="/contactus?product_name=#{product.name}">
<i class="fa fa-envelope"/> Contact Us for Pricing
</a>
</div>
<!-- Optionally, hide quantity selector if it's still visible -->
<script type="text/javascript">
$(document).ready(function() {
if ($('#o_product_zero_price_message').length) {
$('form.js_add_cart_variants').find('input[name="add_qty"]').closest('.css_quantity').hide();
}
});
</script>
</t>
</xpath>
</template>
</odoo>
Explanation:
product_price_zero_contact_us: This inherits thewebsite_sale.product_pricetemplate (which shows the price) and hides it if the product price is zero AND our feature is enabled.product_add_to_cart_zero_contact_us: This inherits thewebsite_sale.product_add_to_carttemplate (which contains the “Add to Cart” button and quantity input) and hides the main “Add to Cart” button and the terms/share section under the same conditions.product_custom_message_zero_price: This inherits the main product detail section (website_sale.product).- It checks if
product.price == 0andwebsite.prevent_zero_price_saleis true. - If so, it displays your custom message (fetched from
website.zero_price_product_message). - It then adds a “Contact Us for Pricing” button. The
t-attf-href="/contactus?product_name=#{product.name}"is a nice touch, as it can pre-fill the product name on your contact form if your contact form is set up to handle URL parameters. - The small JavaScript snippet attempts to hide the quantity selector if it’s part of a form that wasn’t fully hidden by the previous XML changes. This might need adjustment based on your specific Odoo version and theme.
- It checks if
4. Update __manifest__.py and Install/Upgrade:
Ensure your custom module’s __manifest__.py file lists these new Python and XML files in the data section and any dependencies (like website, website_sale).
{
'name': 'Website Zero Price Product Customization',
'version': '1.0',
'category': 'Website',
'summary': 'Customizes handling of zero price products on Odoo website.',
'depends': ['website', 'website_sale'],
'data': [
'security/ir.model.access.csv', # Make sure to create this for your models if needed
'views/res_config_settings_views_extended.xml',
'views/templates_extended.xml',
# Python files are loaded automatically if in a 'models' directory
],
'installable': True,
'application': False,
}
After creating these files and updating the manifest, install your custom module (or upgrade it if it’s already installed) from the Odoo Apps menu (ensure developer mode is active to see Update Apps List and technical features).
Setting Your Custom Message in Odoo Settings
Once your custom module is installed or upgraded:
- Go back to Website -> Configuration -> Settings.
- You should now see your new settings section, likely labeled “Activate ‘Contact for Price’ for $0 Items” or similar.
- Check the box to enable the feature.
- The “Display Message for $0 Products” field will appear. Enter your desired message here (e.g., “This item requires a custom quote. Please contact us for pricing and more information.”). The VTT (around 03:01) shows entering custom text like “Anda dapat menghubungi kami untuk mendapatkan informasi yang tepat” (You can contact us to get the correct information).
- Click Save.
Verifying the Changes on Your Odoo Website
Finally, it’s time to test!
- Go to your Odoo website frontend.
- Navigate to a product that you have set with a price of $0.00 in the Odoo backend (Products menu).
- You should now see:
- The standard price display is hidden.
- The “Add to Cart” button and quantity selector are hidden.
- Your custom message (e.g., “Contact us for pricing”) is displayed prominently.
- A “Contact Us for Pricing” button is visible, linking to your contact page.
This confirms that your setup for handling Odoo Zero Price Products is working as intended, providing a much clearer call to action for your customers, as demonstrated in the VTT (around 03:17 where the custom message “hubungi kami untuk harga” – contact us for price – appears).
Benefits of This Approach for Odoo Store Owners
Implementing a proper “Contact Us for Pricing” strategy for your Odoo Zero Price Products offers several significant advantages:
- Improved Lead Generation: Every click on the “Contact Us” button for a zero-price item is a warm lead from an interested customer. This is far more valuable than a confusing $0.00 transaction.
- Enhanced Customer Experience: Clear communication reduces customer frustration. Instead of wondering why a product is $0.00 or “not available,” they receive a direct instruction on how to proceed.
- Reduced Errors and Misunderstandings: You eliminate the risk of customers accidentally (or intentionally) trying to order items for free, saving your customer service team time and potential headaches.
- Professional Product Presentation: It shows that your business has a defined process for items with variable or quote-based pricing, enhancing your brand’s credibility.
- Opportunity for Upselling/Consultation: The direct contact initiated by the customer provides a perfect opportunity for your sales team to understand their needs better, offer consultation, and potentially upsell or cross-sell other products or services.
- Better Data for Sales Insights: Tracking inquiries for specific Odoo Zero Price Products can give you valuable data on which custom items are most popular.
Further Considerations for Odoo Zero Price Products
While the solution outlined above is robust, here are a few more points to consider for an optimal setup:
Linking to the Correct Contact Page or Form
Ensure the “Contact Us for Pricing” button links to the most effective destination. This could be:
- Your general contact page.
- A specific quote request form.
- A contact page with a pre-filled subject line or product name (as shown in the QWeb example:
t-attf-href="/contactus?product_name=#{product.name}"). This helps your sales team quickly identify which product the inquiry is about.
Training Your Sales Team
Your sales or customer service team should be prepared to handle inquiries coming from these Odoo Zero Price Products. They need:
- Access to product information and pricing guidelines.
- A clear process for generating quotes and following up on leads.
- Understanding of why certain products are set up this way.
Using Product Variants for Complex Pricing
For some scenarios, Odoo’s product variants feature might be an alternative or complementary solution. If pricing depends on a few selectable attributes (e.g., size, material), variants can calculate the price dynamically. However, for truly custom items or services, the “Contact Us for Pricing” approach for Odoo Zero Price Products remains superior.
SEO Implications for Products Without Prices
Products without a visible price can sometimes be tricky for SEO. Ensure that:
- The product page still contains rich, descriptive content about the product’s features and benefits.
- You use appropriate keywords related to the product itself, not just “contact for price.”
- Consider using structured data (Schema.org) to mark up the product. While there isn’t a direct “price on request” schema for
Product, you can useOfferwithpriceSpecificationor focus on clearly indicating the product is available upon inquiry. An outgoing link to learn more about product schema could be Google’s documentation on Product structured data.
Conclusion: Taking Control of Your Odoo Product Pricing Strategy
Effectively managing Odoo Zero Price Products is a vital aspect of a successful e-commerce strategy, especially for businesses offering customizable goods or services. By moving away from potentially confusing $0.00 listings and implementing a clear “Contact Us for Pricing” mechanism, you transform a challenge into an opportunity. Odoo, with its inherent flexibility and customization capabilities, allows you to tailor this process precisely to your business needs.
By following the steps outlined in this tutorial—activating the built-in features and, where necessary, implementing custom module enhancements as inspired by the VTT “Prevent Selling of Zero Price Products on Odoo Website | Show "Contact Us for Pricing" Button #odoo [mwjkMfjZTWU].id.vtt”—you can create a more professional, user-friendly, and lead-generating experience on your Odoo website. Take control of your pricing presentation and guide your customers effectively towards a sales conversation for your unique Odoo Zero Price Products. For more advanced Odoo customizations and community support, resources like the Odoo Community Association (OCA) can be invaluable.
Discover more from teguhteja.id
Subscribe to get the latest posts sent to your email.

