Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I'm following this guide
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' %}
<input type="hidden" name="checkout_url" value="/collections/wholesale" />
{% else %}
<input type="hidden" name="checkout_url" value="/collections/all" />
{% 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?
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
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025