How can I make checkout impossible without a specific product in basket?

Topic summary

A user needs to enforce a checkout restriction on their Shopify store: customers must have at least one variant of a specific product in their cart before proceeding to checkout.

Current Status:

  • The question remains open with no complete solution provided yet
  • Two respondents have offered assistance

Proposed Approaches:

  • One commenter requested the store URL to assess the situation and recommend a tailored solution
  • Another confirmed this is achievable through custom theme code, referencing a similar implementation they created that disables checkout when cart items are from different collections (YouTube video link provided as reference)

Next Steps:

  • Awaiting either the store URL or further technical guidance on implementing the custom code solution
Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Checkout must not be possible without a specific product in basket. That product has multiple variants. One of these variants needs to be in cart before being able to checkout.

How to do this?

Could you please share your store url so that I take a look and provide you best solution.

Thanks

Hi @IIIISEIIII ,

Yes, this is possible with via custom code in theme.

We have made similar code where we disable checkout if items are from different collection.