View Single Post
Old 03-27-2021, 09:38 AM
Ed B. Ed B. is offline

Join Date: Apr 2016
Posts: 431

Default Re: Adding customer title options

Thank you Steve.

It is hardcoded, but can be overriden easily.

The relevant lines in the class classes/XLite/View/FormField/Select/Title.php are
protected function getDefaultOptions() { return array( 'Mr.' => static::t('Mr.'), 'Ms.' => static::t('Ms.'), 'Mrs.' => static::t('Mrs.'), );
So just write a class that extends Title.php and override the method getDefaultOptions(), add labels and translations if necessary, and you will be fine.
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote