Block checkout based on customer and cart

Highlighted
New Member
2 0 0

Hi,

I want to essentially control whether or not each customer (that also must be logged in) can checkout and handle the logic from my shopify app server.

It seems the client can access the checkout page simply by going to mystore.myshopify.com/checkout, but I would like to pass the customer ID and cart items to my app for verification on demand before loading /checkout but I'm not too sure what's the best or recommended approach to do this with Shopify? Of course, I'd like to make sure this can't be bypassed.

I'm still familiarizing with making web apps and Shopify so I greatly appreciate it if anyone can provide some straight forward suggestions. Thanks!

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
911 60 151

Hey, there!

Dallas here from Shopify's Social Care Team.

I have just the solution for you for what you're looking for. If you're wanting customers to only be able to get to the checkout if they have a customer account then you're going to want to create a lock on your website.

Although that isn't something that comes natively to the Shopify platform I did some digging in our app store and I found one that I think should do the trick for you. It's called EasyLockdown. 

I also found a really great forum thread from a Shopify user looking for this same thing. One of our employees found an option for them that you might be able to use depending on your Shopify theme and if it has this setting built-in. If you go to your online store customizer under "Checkout" you might find a setting for Manual Login.

It does require a bit of coding so if you're not comfortable with that then I suggest you reach out ... who certainly would be able to add this in for you. In addition, if your theme doesn't have this feature automatically built-in then you might even be able to reach out to the Experts to get them to custom build this for you if the other options don't work or aren't interesting to you. 

After you look at those options please let me know if you have any further questions. I am more than happy to see what else I can help you out with when it comes to this. 

Dallas | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

1 Like
Highlighted
New Member
2 0 0

Hi Dallas,

Thanks for your suggestions! So that app you suggested doesn't allow locking the actual checkout unfortunately, so I did a bit more digging around.

An idea i had was to add Javascript in the theme.liquid head to redirect the /checkout page away to somewhere else, but it seems the theme doesn't apply to the checkout page. Although it seems I could achieve this if i had a Shopify Plus account to edit the checkout.liquid file but is there any other ways do this without Plus?

Any other suggestions are welcome of course!

Thanks,

Jeff

0 Likes
Highlighted
Shopify Staff
Shopify Staff
911 60 151

You're right the checkout liquid is locked if the store isn't plus which means you as the merchant wouldn't have access and I also wouldn't have access as Shopify support. 

Nothing specifically is coming to mind other than possibly creating a rule in the cart page or on the product page. That would fall a bit outside of my area of expertise as general support, but I think speaking with one of the Shopify Experts could be a great way to brainstorm an idea for this. I can't promise that they will have a solution, but I think that would be the most likely area to find the best next steps for this. 

Please let me know if you have any further questions! 

Dallas | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes