kcpau Posted September 20, 2016 Share Posted September 20, 2016 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 More sharing options...
Tung at RockPOS.com Posted September 21, 2016 Share Posted September 21, 2016 Did you try modifying this under each country? Hope that helps! Tung Link to comment Share on other sites More sharing options...
kcpau Posted September 21, 2016 Author Share Posted September 21, 2016 I modified this, but when I put brackets around firstname I got an error that the index (firstname) is not found. So that does not seem to work. Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted September 22, 2016 Share Posted September 22, 2016 So no idea, I'm sorry Link to comment Share on other sites More sharing options...
kcpau Posted September 23, 2016 Author Share Posted September 23, 2016 I managed to get what I want by hacking into AddressFormat.php. But there must be a better way. 1 Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted September 23, 2016 Share Posted September 23, 2016 I managed to get what I want by hacking into AddressFormat.php. But there must be a better way. Can you please explain what you did with AddressFormat? Thanks! Link to comment Share on other sites More sharing options...
kcpau Posted September 24, 2016 Author Share Posted September 24, 2016 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 More sharing options...
Tung at RockPOS.com Posted September 26, 2016 Share Posted September 26, 2016 Ah, okay, not really cool but it works Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now