1

I want my customers to enter their date of birth and place of birth during the checkout.

Do I have to overwrite the Address commerce model somehow? (\craft\commerce\models\Address).

Something else I could think of is adding custom fields to the user itself. Though I'm not sure if this is the correct way.

1 Answer 1

1

I would suggest that date and place of birth would be more appropriate as custom fields on the User profile rather than attached to the address. They don't appear to have any relevance to an address, unless there's a very particular use-case you're building for.

2
  • The user orders a course for either themselves or someone else. This requires a date of birth and place of birth. This can differ per order so it made sense to put it in the Address but is not required. A profile field would be less favorable.
    – Rayco
    Commented Oct 24, 2022 at 9:04
  • Ah. In that case, the data for date and place of birth are relevant to the order itself so I'd add them to the product/variant that's used for the course, rather than the address. Commented Oct 24, 2022 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.