Prevent users from purchasing a specific product

Prevent users from purchasing a specific product

Anton_V
Shopify Partner
1 0 0

Hi,
I'm faced with a non-trivial task and would like to find out if Shopify allows the implementation of the following logic at all:
My PO wants to sell subscriptions for the custom children's application through the Shopify store. The idea is that this subscription product should only be available if the user doesn't have an existing subscription linked to the email specified during checkout. 
1. If a user purchases any simple product in our store, the logic will be standard.

2. If a user purchases a specific product (Subscription for our app), we would like to prevent the default behavior when clicking on the "Pay Now" button on the Checkout page. For this specific product, we would like to send a request to our custom app database to check if we already have a user with the email specified on the Checkout page inside our app database.
a)If this is the case, we want to show a notification recommending not to proceed.
b)If the email is not in our database, we will allow the purchase.

 


I would greatly appreciate any help or ideas here. The main issue is to understand if the above-mentioned logic is possible in Shopify, because as far as I know, there are a lot of restrictions on the Shopify side, especially concerning Checkout customization.

Replies 0 (0)