AbanteCart Community

eCommerce construction => How-to questions => Topic started by: dharding on January 07, 2018, 05:53:13 PM

Title: How to dynamically show categories based upon whether they contain products
Post by: dharding on January 07, 2018, 05:53:13 PM
Not sure if this is possible or how complex it would be to implement. If this feature already exists, my apologies but I did not find the appropriate settings in Admin.

Rather than displaying categories in menus, the site map, etc., based upon a manual setting in Admin, it would be great to be able to show/hide categories and subcategories dynamically based upon whether there are in-stock products assigned to them.

This would make managing storefront display much easier, as when a category gets sold out, it simply disappears from the store front until such time an active in-stock product is assigned or re-assigned to that category.

Thank you.
Title: Re: How to dynamically show categories based upon whether they contain products
Post by: eCommerce Core on January 08, 2018, 07:50:56 AM
There is no such setting or feature to disable category based on products stock status.

I see 1 problem with this approach. If you care about SEO, this will affect your product/category search in the search engines if a product stock will change with long intervals.

This feature can be added easily with extra check in the data model. This check can validate for categories with present products in them and only show categories with available products.

You can use "No stock auto disable" to turn products off automatically.


Title: Re: How to dynamically show categories based upon whether they contain products
Post by: dharding on January 08, 2018, 08:15:19 AM
Thank you for the reply. I already have individual products set to auto-disable; it's the category visibility I wish to be able to control automatically.

SEO is not overly important to me, as the majority of traffic to the storefront will be sent from specific websites. I'm not relying on organic traffic; any organic traffic is a bonus.
Title: Re: How to dynamically show categories based upon whether they contain products
Post by: abantecart on January 15, 2018, 11:15:47 AM
We can consider this for upcoming versions.