Advice and answers from the Locksmith Team

When a customer reaches a locked product or collection that requires them to log in to see the page, they'll be presented with a login form. You can make sure they get back to that page after they have logged in. Here are the steps: 

From your Shopify admin page, click on Online Store and then Themes. 

Next, click the button with "..." and click Edit HTML/CSS.


You'll see a list of files on the left side. Choose customers/login.liquid. Click on that file to edit. 

Find this element on the page: 

{% form 'customer_login' %}


Right below that line, create an empty line and paste this code:

<input type="hidden" name="checkout_url" value="/account/login?checkout_url={% if collection %}/collections/{{ collection.handle }}{% endif %}/products/{{ product.handle }}" />



Then click Save.

Did this answer your question?