Shop by Category
ERPNext includes a built-in Shop by Category page available at:
/shop-by-categoryInstead of immediately applying filters, customers can browse products through predefined categories, making navigation easier and improving the shopping experience.
Prerequisites
- Create and publish Website Items.
- Configure E-Commerce Settings.
- Enable Field Filters (Categories).
Configuring Shop by Category
To configure the categories displayed on this page:
E-Commerce Settings → Filters and Categories
Steps
- Open E-Commerce Settings.
- Navigate to the Filters and Categories section.
- Enable Field Filters (Categories).
- Add the Website Item fields that should appear as categories.
- Save the settings.
/shop-by-category page using the selected Website Item fields.Supported Categories
The Shop by Category page uses the fields configured in the Website Item Fields table.
Common categories include:
- Item Group
- Brand
- Manufacturer
- Custom Website Item fields
- Any linked DocType configured as a field filter
Adding a Banner Slideshow
The Shop by Category page supports an optional slideshow banner.
Configuration
- Open E-Commerce Settings.
- Navigate to the Shop By Category section.
- Select the desired Slideshow.
- Save the settings.
Fetching Category Records
ERPNext uses different methods to retrieve records depending on the category type.
Item Groups
Because Item Groups follow a hierarchical tree structure, ERPNext only displays Item Groups that satisfy specific conditions.
- Show in Website is enabled.
- The Item Group is one of the following:
- The top-most parent group (Is Group enabled and parent is All Item Groups), or
- The top-most leaf node (Is Group disabled and parent is All Item Groups).
Other Categories
Categories such as Brand or other linked records are retrieved without hierarchical restrictions.
Only records with this checkbox enabled will be displayed on the Shop by Category page.
Using Custom Categories
ERPNext also supports custom linked DocTypes as categories.
- Custom DocTypes
- Linked records
- Industry-specific classifications
- Product collections
- Seasonal categories
The only requirement is that the custom DocType is linked to the Website Item through a Link field.
Typical Configuration Workflow
- Create Website Items.
- Open E-Commerce Settings.
- Enable Field Filters (Categories).
- Select Website Item fields as categories.
- Configure an optional slideshow banner.
- Enable Show in Website for Item Groups.
- Save the configuration.
- Browse products through the
/shop-by-categorypage.
Key Benefits
- Provides intuitive category-based product browsing.
- Reduces dependence on manual filtering.
- Supports Item Groups, Brands, and custom categories.
- Includes optional promotional slideshow banners.
- Supports custom visibility using Show in Website.
- Works seamlessly with Website Items and E-Commerce Settings.