Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Products with "Minimum age to purchase" #7387

Open
AndreiMaz opened this issue Oct 28, 2024 · 0 comments
Open

Products with "Minimum age to purchase" #7387

AndreiMaz opened this issue Oct 28, 2024 · 0 comments

Comments

@AndreiMaz
Copy link
Member

AndreiMaz commented Oct 28, 2024

Let's add a new product property indicating whether a "Minimum age to purchase" could be specified.

Let's name it - "Age verification" (disabled by default). Once ticked a store owner will be able to enter a child integer property "Minimum age to purchase" (set to 18 by default).

Also once "Age verification" is ticked ensure that "Date of birth" customer option is enabled in admin area. Otherwise, display an yellow warning.

Such products could be viewed by customers. But they will require customer registration before checkout (so he can enter this date of birth during checkout). And they will require a "date of birth" to be specified for customers (ensure it's entered for such customers who registered before this option was enabled).

Then validate this property in the "GetProductWarnings" method if a customer is too young, then display a warning that this products is available for customers older than N years"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant