One product per customer (not per order)

Hi

I’m seeking assistance with a specific requirement for my Shopify store. I offer a free trial service for Instagram product, and I need to ensure that clients can only use each free trial once. Currently, I use a single tag (test-sent) to indicate that a client has claimed a free trial.

Here’s what I need help with:

Tagging System: When a client purchases any free trial, I tag them with “test-sent” (Already done).

Blocking Repeated Trials: I need to block clients from purchasing any free trial service again if they already have the test-sent tag. They should be able to buy other paid services, but not the same free trial they have previously used.

Implementation Details: I’ve already automated the tagging process. Now, I need a solution to:

  • Restrict the purchase of any free trial if the test-sent tag is present.
  • Ensure this restriction only applies to free trials and does not affect the purchase of other products or services.

I’ve tried some apps, but they haven’t met my needs. Does anyone have suggestions for how to achieve this using free apps, Shopify’s built-in features or custom code?

Any advice or examples would be greatly appreciated!

Thank you!

Hello @matias_palacios ,

Only custom code will work here.

  1. You need to check whether the customer is logged in or not. If not you have to redirect him to the login page.

  2. Once a customer is logged in then you can check which tag is available with the customer account.

  3. In the 3rd step create a checkbox for the product so the admin can select to which product restrictions will apply.

  4. Find the product template and make the necessary changes in code:
    a) Check product metafield is checked or not.
    If checked, hide the atc button and display a customer message saying something like you cant purchase this product.
    else leave the default code as it is.

Thanks