How to redirect to a specific page if a customer with a specific tag logs in?

I’m following this guide

https://www.envision.io/blogs/ecommerce-pulse/80312001-how-to-add-a-wholesale-area-to-your-shopify-store

And was able to successfully configure my store so that they can only see specific products tagged wholesale if the customer has a “wholesale” tag. However I’m running into a problem.

I would like to direct customers with a wholesale tag to a different home page when they log in. By default it directs them to their account page that just shows their past orders and addresses. Is there a way to redirect to a specific page if they have that tag?

Here’s what I’ve tried. Under customers/login.liquid, I included this statement.

{% form ‘customer_login’, novalidate: ‘novalidate’ %}
{% if customer.tags contains ‘wholesale’ %}

{% else %}

{% endif %}

Even though the customer is tagged wholesale, the else statement is triggered instead. My guess is that the code doesn’t see the customer.tag as having the value wholesale, but I’m not sure what to do about that. Any ideas?

@NomadicRoots

OK so essentially the redirect needs to be done once they are logged in else the liquid code doesn’t have access to the customer object.

So the code needs to be deployed on the page they are automatically redirected to

login > Account Overview > Redirect

You will need to deploy a redirect using JS on the Account overview page once there logged in

I hope this helps if not we can deploy this for you reach out to us here

Many Thanks

Mike

Did you end up finding a workable result on this? I am trying to redirect a specific customer, the only one with their tag, to a specific page upon logging in.

@RoastedRiches drop me a line or contact us through our website. If we cna get a little more detail we can work a solution out for you

Did you ever get this figured out? I need the exact same thing. Any help is appreciated!

@CaStLeDzgns We can implement any of this for you no problem we have don it hundreds of times

Hi, I need help with the same thing