All things Shopify and commerce
I would like some help from anyone familiar with shopify theme code.
I want to call their login page, and have it return to the calling page after login.
I see through google that shopify have provided and then dropped this functionality regularly over the last seven years.
In several cases they have provided a different search parameter for the return url, called:
return_url=
return_to=
redirect_to=
checkout_url=
when you call the login url ( currently /account/login used to be /customer_identity/login now a 404 error )
I am setting ALL of these, they are ignored.
I think the latest fix, until shopify change it again, is some complicated edit of the login form in the theme, to automatically return to the calling page after login, but I cannot find code that works.
BTW logOUT return works fine 🙂 using /account/logout?return_url=
Hey @kshepherd,
Have a look at this resource, it'll redirect shopper to a specific location after login: https://www.revize.app/blog/customize-shopify-login-redirect-guide-for-new-customer-accounts
Hope this helps!
Cheers!
Shubham | Untechnickle
Helping for free: hello@untechnickle.com
Don't forget to say thanks, it'll make my day - just send me an email!
Get Revize for Free | Let your shoppers edit orders post-purchase | Get Zero Support Tickets | #1 Order Editing + Upsell App
Thank you for your suggestion. I tested this just now, and it did not work.
I followed the guide that you linked, it says you need to search and replace all instances of:
{{ routes.account_login_url }}
and replace with:
{{ routes.storefront_login_url }}
in the theme code (I found three, in sections/registration-form.liquid line 89, snippets/mobile-menu.liquid line 51, snippets/header__action-icons.liquid line 63)
After entering my email address on the login screen, and then the 6 digit code emailed to me on the verify screen, I am redirected to /account/orders
Hey @kshepherd,
Can you DM or email us your collaborator code & store URL so that we can understand and fix this issue? That'd be great!
Looking forward to hearing from you,
Shubham | Untechnickle
Helping for free: hello@untechnickle.com
Don't forget to say thanks, it'll make my day - just send me an email!
Get Revize for Free | Let your shoppers edit orders post-purchase | Get Zero Support Tickets | #1 Order Editing + Upsell App
Coding expert
Does anyone know the answer? None of the responses so far have been correct. I think the first one probably worked on an older version of shopify, but I do not think we can roll back.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025