Feature Request: Categories associated with products
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Feature Request: Categories associated with products
Hi,
I think, it would be great to have the option to show categories only in the frontend if they associated with an enabled product.
Regards
Timble
I think, it would be great to have the option to show categories only in the frontend if they associated with an enabled product.
Regards
Timble
Re: Feature Request: Categories associated with products
In which scenario categories should be hidden?trimble wrote: I think, it would be great to have the option to show categories only in the frontend if they associated with an enabled product.
1.) If a category contains no products at all
It's possible but requires executing a least one additional query and a filtering of the category nodes afterwards. This is quite expensive and what is if child categories have products associated? If you have a category with no products associated, you can easily disable it in the admin interface or during a product import.
2.) If a category doesn't contain any products matching the current filter
The product counts for the categories are calculated asynchronous way to prevent a slow down of rendering the filter and the other elements of the page. Thus, you can only hide categories via Javascript after the page is loaded which might be confusing for the user if categories are vanishing after the page is loaded.
Re: Feature Request: Categories associated with products
This is the scenario I'm thinking of.
I know that's easy to disable a category in the admin interface but it's although easy to forget to disable a category when a product with a unique category is sold out.
A Category should only be hidden if it has no child categories with associated products.1.) If a category contains no products at all
It's possible but requires executing a least one additional query and a filtering of the category nodes afterwards. This is quite expensive and what is if child categories have products associated? If you have a category with no products associated, you can easily disable it in the admin interface or during a product import.
I know that's easy to disable a category in the admin interface but it's although easy to forget to disable a category when a product with a unique category is sold out.
Re: Feature Request: Categories associated with products
In that case, the whole category subtree would have to be checked if there are any products associated to one of the categories.trimble wrote:A Category should only be hidden if it has no child categories with associated products.
That's a different scenario because sold out products are still associated to a category and are displayed to the customer. The stock level of a product is determined in an asynchronous way too.trimble wrote:I know that's easy to disable a category in the admin interface but it's although easy to forget to disable a category when a product with a unique category is sold out.
Re: Feature Request: Categories associated with products
You're right. I forgot to write that I build a shop which will have unique products always with a few amount and when the product is sold out it will be removed and 'never' comes back. So it's a nice feature to have removed the associated category automatically when no other product ist associated with the category too.That's a different scenario because sold out products are still associated to a category and are displayed to the customer. The stock level of a product is determined in an asynchronous way too.
Re: Feature Request: Categories associated with products
OK, this is a very special case. You can do this with Aimeos when you add a filter that removes all categories without products and stocks before they are handed over to the template for rendering but you have to implement that yourself or pay somebody if you are not a developer.trimble wrote:I forgot to write that I build a shop which will have unique products always with a few amount and when the product is sold out it will be removed and 'never' comes back. So it's a nice feature to have removed the associated category automatically when no other product ist associated with the category too.