Jump to content

Adding strings to Address Format


kcpau

Recommended Posts

In lines 234-238 in AddressFormat.php, for the function _setOriginalDisplayFormat, there are these comments:

 

    /*
    ** Set the layout key with the liable value
    ** example : (firstname) => 'Presta' will result (Presta)
    **         : (firstname-lastname) => 'Presta' and 'Shop' result '(Presta-Shop)'
    */
 
This is exactly what I need, to put brackets around the firstname.  But I have no idea what is liable value and how to get this to work.  Can someone help?
 
Thank you.
Link to comment
Share on other sites

I added the following lines 

 

if ($mainFormattedKey=='firstname') {
   $formattedValueList[$mainFormattedKey] = '(' . $formattedValueList[$mainFormattedKey] . ')';
}  
 
after
 
$formattedValueList[$mainFormattedKey] = $start.$formattedValue.$end;
 
in function _setOriginalDisplayFormat in the class AddressFormatCore
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...