On checkout steps - first step "personal-information.tpl" has a forms for login or creating account.
I need to modify fields of this form - modify form actually. There is a gender radio input that I do not want to be seen for ex. or birthday date field.
So I have created folder form in override/classes and put there CustomerFormatter.php class -to override form class (as I do not want to modify Presta core files)
I thought that:
private $ask_for_birthdate = true;
private $ask_for_partner_optin = true;
private $partner_optin_is_required = true;
stands for form fields to be shown or not - but it seems that was wrong..
(have set $ask_for_birthday to false but the birthday date field is still present in form)
What am I missing? How to control what form fields are displaying in forms on checkout pages?
UPDATE I have found that birthday date in forms can be turn off in PS options. But when I make changes in override the gender fields they are still there.
When I make change in classes/form/CustomerFormatter.php - it behaves as it should but when in:
override/classes/form/CustomerFormatter.php - nothing happens....
I work on PS 8.04
I found the problem and will share solution.
1 -override class must extend core - which I was missing - that was reason why changes made in class did nothing.
so
override/classes/form/CustomerFormatter.phpshould start withrookie mistake..
2 - as pointed by @ébewè You can disable Genders from the BO, by: