Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sreichel/magento2-stackexchange_hideemptycategories
I was wondering if there was a may to have magento hide the category altogether if the products in the category have no stock.
https://github.com/sreichel/magento2-stackexchange_hideemptycategories
Last synced: about 2 months ago
JSON representation
I was wondering if there was a may to have magento hide the category altogether if the products in the category have no stock.
- Host: GitHub
- URL: https://github.com/sreichel/magento2-stackexchange_hideemptycategories
- Owner: sreichel
- License: gpl-3.0
- Created: 2021-11-28T16:55:57.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-28T17:43:00.000Z (about 3 years ago)
- Last Synced: 2024-11-25T03:39:16.550Z (2 months ago)
- Language: PHP
- Homepage: https://magento.stackexchange.com/questions/229481/how-to-hide-empty-categories-in-magento2
- Size: 14.6 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Magento2: Hide Empty Categories
[![Latest Stable Version](http://poser.pugx.org/mse-sv3n/m2-hide-empty-categories/v)](https://packagist.org/packages/mse-sv3n/m2-hide-empty-categories)
[![Total Downloads](http://poser.pugx.org/mse-sv3n/m2-hide-empty-categories/downloads)](https://packagist.org/packages/mse-sv3n/m2-hide-empty-categories)
[![Latest Unstable Version](http://poser.pugx.org/mse-sv3n/m2-hide-empty-categories/v/unstable)](https://packagist.org/packages/mse-sv3n/m2-hide-empty-categories)
[![License](http://poser.pugx.org/mse-sv3n/m2-hide-empty-categories/license)](https://packagist.org/packages/mse-sv3n/m2-hide-empty-categories)
[![PHP Version Require](http://poser.pugx.org/mse-sv3n/m2-hide-empty-categories/require/php)](https://packagist.org/packages/mse-sv3n/m2-hide-empty-categories)
[![Support](https://img.shields.io/badge/paypal-donate-lightblue.svg?logo=paypal)](https://www.paypal.me/sv3n1)> I'm in the final stages of setting up my magento 2 store. In the backend I have a process using the API to keep stock information up to date. Sometimes the stock drops to 0 for every item in a category, making it empty. If you go to one of those categories you get:
>
> `We can't find products matching the selection.`
>
> This makes sense, but I was wondering if there was a may to have magento hide the category altogether if the products in the category have no stock.**Source:** https://magento.stackexchange.com/questions/229481/how-to-hide-empty-categories-in-magento2
## Installation
```
composer require mse-sv3n/m2-hide-empty-categories
bin/magento setup:upgrade
```## Support
If you have any issues with this extension, open an issue on [GitHub](https://github.com/sreichel/magento2-StackExchange_HideEmptyCategories/issues).## Contribution
Any contribution is highly appreciated. The best way to contribute code is to open a [pull request on GitHub](https://help.github.com/articles/using-pull-requests).## License
[OSL - Open Software Licence 3.0](http://opensource.org/licenses/osl-3.0.php)