How to redirect loged in users to the main collection page instead of sending them to their account?

ConstructVicky
New Member
6 0 0

Hello

How can I redirect loged in users to the main collection page or aproduct page instead of automatically sending them to their account?

Regards

0 Likes
gina-gregory
Shopify Expert
710 48 180

Open the 'customers/login.liquid' template in your theme and find the login form and add a hidden field like this:

{% form 'customer_login' %}
<input type="hidden" name="checkout_url" value="/collections/all">
...
{% endform %}

 

ConstructVicky
New Member
6 0 0

Hello

 

Like this?

 

<div id="CustomerLoginForm">
{% form 'customer_login' %}


<input type="hidden" name="checkout_url" value="/collections/all">


<div class="section-header section-header--large">
<h1 class="section-header__title">{{ 'customer.login.title' | t }}</h1>
</div>

0 Likes
gina-gregory
Shopify Expert
710 48 180

Yep. Give it a go and test it out.

0 Likes