How to make requirement of account creation during checkout depending on products in cart

New Member
6 0 0

Dear forum users,

in our shop, we have the creation of user accounts during checkout set to optional - and we would like to keep it this way in general.

For some products, though, we need it to be mendatory. We have some courses that we sell, and people need to log in in order to access the pages that host the courses. So they need an account - but many forget to check the checkbox.)

How can I change this from optional to mendatory as soon as products of a certain type or with a certain tag are in the cart?

I know that for example in the cart itself, it is no problem to built something like that - but since you cannot access the checkout code (... unless you have shopify plus, I guess, which is not the case...), it's not that simple, right?

Can you maybe fill this parameter of "required" being true or false earlier on, like in the cart, so that it is passed through into the checkout and overwrites the setting from the shopify setings?

Thanks for your help,



Hi @McNitefly. For now it's only possible to set accounts required only in general, for the whole store, as described in Shopify Docs
We are using this in our Courses app where in order to start using the app it's required to set customer accounts to "required" mode. In this way it's possible to identify customer accounts that are allowed to see courses content.