FROM CACHE - en_header
Return management just got easier! We’ve launched Customer Self-Serve Returns to all Shopify merchants. Click here to learn more!

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 11 (11)
hari1_prasad
Shopify Partner
211 37 37

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...

If your problem solved then Like & Accept this Solution.
For Design, Development and custom changes Hire Me or drop me a message or connect at Email ID: gr.trading15@gmail.com for quick consultation.
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.

hari1_prasad
Shopify Partner
211 37 37

@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.

If your problem solved then Like & Accept this Solution.
For Design, Development and custom changes Hire Me or drop me a message or connect at Email ID: gr.trading15@gmail.com for quick consultation.
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

hari1_prasad
Shopify Partner
211 37 37

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??

If your problem solved then Like & Accept this Solution.
For Design, Development and custom changes Hire Me or drop me a message or connect at Email ID: gr.trading15@gmail.com for quick consultation.
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?

hari1_prasad
Shopify Partner
211 37 37

It depends on condition where you will put that.

 

You can achieve anything you want.

If your problem solved then Like & Accept this Solution.
For Design, Development and custom changes Hire Me or drop me a message or connect at Email ID: gr.trading15@gmail.com for quick consultation.
To support Buy Me a Coffee
arachnidshop
Tourist
11 0 1

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

hari1_prasad
Shopify Partner
211 37 37

Yes offcourse 

If your problem solved then Like & Accept this Solution.
For Design, Development and custom changes Hire Me or drop me a message or connect at Email ID: gr.trading15@gmail.com for quick consultation.
To support Buy Me a Coffee
arachnidshop
Tourist
11 0 1

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