OdooWiki OCA HUB

Website Snippet Product Category

website_snippet_product_category folder_open OCA/e-commerce open_in_new
Website License: LGPL-3

Adds a new snippet to show e-commerce categories.

A category is only displayed if it and all of its parent categories are explicitly enabled for the snippet, and can optionally be restricted to selected websites.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Adds a new website building block that displays a tree of e-commerce product categories. You choose which categories appear and on which websites.

This module adds a "Product Category" block to the website builder, in the Content section of the snippet menu. Once dropped on a page, the block shows a tree of product categories with their images and links to the shop, up to five levels deep.

Which categories appear is controlled from the product category settings. Each category has a new toggle "Published in product category snippet". A category is only shown if it and all of its parent categories are switched on. There is also a field "Websites for category snippet" where you can limit a category to selected websites; leaving it empty shows the category on all websites. This field is only visible to users who manage multiple websites.

Both fields are added to the product category form and list views, so you can set them directly from the category screens.

On the website, the block loads the category tree from the server and displays a warning if no categories are found. The block is not editable by visitors, and its content is cleared before saving the page.

Depends on

website_sale
Models and fields (1)
  • product.public.category · extends an existing modelsnippet_website_ids (Websites for category snippet), published_in_product_category_snippet (Published in product category snippet)

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 7 confirmed, 2 with no information of 9 versions.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/e-commerce.

terminal Installation and usage

OCA documentation · Odoo 19.0

You can select what categories can be shown by the snippet and an image for the category:

  • Go to website \> eCommerce \> eCommerce Categories
  • Create or Edit one
  • You can see a new options "Published in product category snippet"
  • You can also set "Websites for category snippet" to restrict where the category is shown in the snippet. Leave it empty to show it on all websites.
  • Go to website (frontend)
  • Press 'Edit' button
  • Drag the 'Product Category' snippet to the place of the website that you want
  • Save changes

Theming

CSS Classes:

  • .categ_container \> The container per master category
  • .categ_scroll_wrapper \> The scrollable container wrapper
  • .categ_scroll \> The scrollable container
  • .categ_tree_level \> The category row (image + text)
  • .main_tree_level \> The first category row level displayed
  • .categ_link \> The link of the category row
  • .categ_img \> The container of the icon of the category row

You can use 'data-tree-level' attribute to select the category row of a selected level (1-4 by design).

Also you can replace the entire template by setting the data-template attribute directly on the .js_product_category element, e.g. by inheriting the view where the snippet is placed:

<xpath expr="//div[hasclass('js_product_category')]" position="attributes">
    <attribute name="data-template">my_module.my_custom_template</attribute>
</xpath>

You only need know that the name of the variable that have all the categories is called object.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.