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

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

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
Code:
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