Re: I Want To Redirect Non-Logged-In Users To The Registration Page When They Attempt To Make A Purc

I Want To Redirect Non-Logged-In Users To The Registration Page When They Attempt To Make A Purchase

Brighter
Visitor
2 0 0

We have a membership site on Shopify using Dawn th. Using Appstle. And Oxi Social

 

When users attempt to purchase and press Buy Now, non-logged-in users are directed to the login page. I want to change this so that non-logged-in users are redirected to the registration page instead. 

Reply 1 (1)

Guleria
Shopify Partner
3496 700 982

Hello @Brighter ,

Wrap the buy now button with the condition 

{% if customer %} 
// You default button code
{% else %}
// buttton code with hred 
e.g.
<a href='/account/register'></a>
{% endif %}

 

Remember to make a backup of your theme before making any changes and thoroughly test the functionality after making the modifications. Additionally, Shopify themes may vary, so the exact code and location may differ depending on your theme's structure.

 

Thanks

 

- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com
- Try GEMPAGES a great page builder
- If you want to help me please PAYPAL