Developer forum

Forum » Ecommerce - Standard features » Hide empty groups from navigation

Hide empty groups from navigation

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

Is there a way to hide empty groups from the ecom navigation? Currently they show up in the menu but when you click it you don't see any products. I'd like to hide them from navigation without deleting the group in the backend. Is that possible?

Imar

 


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Imar,

 

A "simple" way is to use Assortments. That will do it.

 

Best Regards,

Nuno Aguiar

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Have you tried to disable "Show in menu" on the empty group?

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Yeah, that could work. The thing is: I have groups where products are assigned to with integration. One day a group may contain products, the next day it may not. Going in and manually hiding or unhiding the group is not ideal for that scenario.

@Nuno: we already use assortments.

Imar

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

That is odd Imar. Assortments are would do exactly that.  We have it working for that particular purpose on a few sites, for example www.petersoncheese.com (which is your scenario where Integration populates products in and out of groups).

 

Could it be a bug in your version?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

I think Imars issue is a little bit different than what assortments handle. Assortments handles when a user do have access to any products in a group, where this issue seems related to no products in a group at all.

@Imar - a solution could be to run a SQL that will hide groups in navigation that holds no products and run it when integration ends. Then maybe combine it with a custom group field so you can detect groups where it was disabled because of this automation and not by a user.

BR Nicolai

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Thanks; I was already leaning towards the SQL statement, so I'll go that route. Not super pretty, but it gets the job done.

Imar

 

You must be logged in to post in the forum