This tutorial provides an explanation of how to set “Date of birth” field as optional one when creating an account in ZenCart.
By default, the “Date of birth” field is required to create an account in ZenCart. In order to make it optional, you should perform the following steps:
Log into your ZenCart admin panel and go to Configuration -> Customer Details:
Click on “Date of Birth” field and make sure it is set to true. Otherwise, select “true” and hit Update button:
Navigate to Configuration -> Minimum Values:
Click on “Date of birth” field, set the number to 0 and hit Update button:
In order to remove asterisk (*) from “Date of Birth” field, you should navigate to includes/languages folder and open english.php file for editing. You can edit it via your cPanel or FTP:
You need to locate the following piece of code (approximately line 208):
define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 05/21/1970)');
and replace it with this line of code (just remove the asterisk (*)):
define('ENTRY_DATE_OF_BIRTH_TEXT', ' (eg. 05/21/1970)');
Save your changes and check your website. “Date of birth” field became optional in your account form.
Now you know how to change “Date of birth” field to optional in the account form in Zencart.
Feel free to check the detailed video tutorial below: