Hiding a specific navigation drop down unless they are logged in and tagged.

arachnidshop
Tourist
11 0 1

Can anyone help me with Hiding the navigation "WHOLESALE" and all the sub menus from customers being able to see it. The only customers I want to be able to see it are the ones that are logged in and tagged "wholesale". Would also like to hide any products from showing up in search that have the tag "wholesale".

I am using the debut theme.

 

www.ArachnidShop.com

Replies 13 (13)

gr_trading
Shopify Partner
1649 139 170

Hi @arachnidshop ,

 

You can check the status of logged in user and its tag with the below code

{%- if shop.customer_accounts_enabled -%}
          {%- if customer -%}
            {{customer.tags}}
          {%- endif -%}
      {%- endif -%}

 

Check the user state and write conditional code to fulfill your requirement.

 

 

Hope it helps...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
arachnidshop
Tourist
11 0 1

No that doesn't help at all lol. That doesn't even relate to what im trying to do.

gr_trading
Shopify Partner
1649 139 170

@arachnidshop ,

 

Your question has two parts.

 

1. Hiding the navigation "WHOLESALE" and all the sub menus from customers being able to see it

Above code will work best for it.

 

2. Would also like to hide any products from showing up in search that have the tag "wholesale"

This will require some more code to integrate into the theme.

 

We can implement this for you if you want.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
arachnidshop
Tourist
11 0 1

I still want customers to see the wholesale navigation but only if they’re a wholesale customer and tagged with “wholesale”. The above code only checks to see if there a customer.

 

yes I want any product that is tagged wholesale to not show up in search

gr_trading
Shopify Partner
1649 139 170

Seems you miss my  {{customer.tags}} code which will print all tags attached to customer and you have to make another validation for the tag to exist.

 

Hope its clear now??

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
arachnidshop
Tourist
11 0 1

No unfortunately not, I don’t even know where to put that code, and I’m not so sure it will do what I’m looking to so, but I’m willing to try if I knew where to put code.

arachnidshop
Tourist
11 0 1

Where would I enter the specific tag 'wholesale' and where would I put this code?

Would this remove just the wholesale from anyone who is logged in but isn't tagged with wholesale from seeing it?

gr_trading
Shopify Partner
1649 139 170

It depends on condition where you will put that.

 

You can achieve anything you want.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
arachnidshop
Tourist
11 0 1

It would be for every page, my navigation is on every page

gr_trading
Shopify Partner
1649 139 170

Yes offcourse 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
arachnidshop
Tourist
11 0 1

Still need help with this problem, solution has not been found yet

 

MCee2
Visitor
3 0 0

Hi Arachnidhop,

 

Did you manage to find a solution for this? I would like to apply something similar.

 

gr_trading
Shopify Partner
1649 139 170

Hi @MCee2 @arachnidshop 

 

I can implement this in your themes if you are willing to hire.

 

Do let me know...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee