Flow Theme - Hide Mega Nav MenuItem, if collection is empty

Greetings all,

I’m working on a webshop for a local store - the webshop is only suppose to house products which are on sale, they have clothes on sale from a lot of different brands (Vendors), but a very small stock on each product which often leads to empty collection pages. What I need is a dynamic Mega Nav which, if the collection of that link is empty, hide the item from the menu. I’m not sure if this is a long shot, but any help would be much appreciated.

Do you need any code from me? If so, can you guide me through which liquid or js file I need to share with you? I’m also not even sure if i’m allowed to - Flow is, after all, a paid theme.

Kind regards

Simon

1 Like

@cbdk

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

1 Like

@KetanKumar

Thank you for your reply!

The site is in Danish, and the currently empty collections I’ve explicitly left out - but https://sale.club-b.dk

1 Like

@cbdk

can you please share video or screenshot?

1 Like

@KetanKumar

Absolutely. And thank you for your time! I’m having trouble uploading .jpeg directly, so I’ve added two images in a .zip file.

Note: These are only examples, as mentioned previously - i’ve explicitly hid empty collections from the drop-down menu for now. But if let’s say the category ‘Cardigans’ is empty, it shouldn’t be shown on the drop-down menu at all.

@cbdk

dynamic not possible bt let me know which collection do you have hide so i will try to code

1 Like

@KetanKumar

Try with collection “Jakker” URL would be: https://sale.club-b.dk/collections/jakker. Thanks :blush:

@cbdk

like this text hide on menu right?

1 Like

@KetanKumar

Exactly - without actually removing the menu item from the menu, just hiding it. :blush:

1 Like

@cbdk

yes its possible to customization code