rahul-singh/module-category-filter
最新稳定版本:v1.0.0
Composer 安装命令:
composer require rahul-singh/module-category-filter
包简介
Category filter column in the Magento 2 Admin Product Grid
README 文档
README
This module extends the default Magento 2 Admin Product Grid to include a Categories column and a powerful Category filter. This makes it easy for administrators to view a product's assigned categories directly in the grid and efficiently filter the product list by one or more categories.
🚀 Features
- Category Column: Displays a comma-separated list of all assigned categories for each product.
- Category Filter: Adds a dropdown filter above the grid, allowing administrators to filter the product collection by selecting a single category.
- Efficient Filtering: Uses the native Magento collection filtering mechanism (
addCategoriesFilter) for better performance when filtering large catalogs. - UI Component Integration: Seamlessly integrates with the existing
product_listing.xmlUI Component configuration.
🛠️ Installation
Recommended: Install via Composer
Run the following command from your Magento root directory:
composer require rahul-singh/module-category-filter php bin/magento module:enable Rahulsingh_CategoryFilter php bin/magento setup:upgrade php bin/magento cache:clean
1. Manual Installation (Download and Place the Module)
Create the directory app/code/Rahulsingh/CategoryFilter and place all the module files inside it.
2. Run Magento Commands
Execute the following commands from your Magento root directory:
# 1. Enable the module php bin/magento module:enable Rahulsingh_CategoryFilter # 2. Run setup upgrade to register the module and apply dependencies php bin/magento setup:upgrade # 3. Clean cache php bin/magento cache:clean
3. Verify
After running the commands, navigate to Admin Panel > Catalog > Products.
- You will see a new Categories column in the product grid.
- A new Category filter option will be available in the filter bar at the top of the grid.
📝 Usage
- Navigate to Catalog > Products.
- Click on the Filters button.
- Locate the Category dropdown, select the desired category, and click Apply Filters.
- The grid will now only show products assigned to the selected category.
Note: This module has been tested with Magento version 2.4.8-p2 (latest at time of writing).
🤝 Contribution
Feel free to fork this repository, submit pull requests, or report any issues you encounter.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-06