Closed mariodees closed 9 months ago
Yea, should be safe to add the format
key
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider the Dedicated Support Service where a Service Level Agreement is offered.
What happened?
Addresses formatted using Countries_model::addressFormat() always use default format : {address_1}\n{address_2}\n{city} {postcode}\n{state}\n{country}
Because of:
app/system/libraries/Country.php
Countries_model::addressFormat()
Countries_model::evalAddress() will strip the format value by rebuilding the address based on the Countries_model::$requiredAddressKeys array which does not include 'format', so $format will always be equal to Countries_model::getDefaultFormat()
Could 'format' be safely added to Countries_model::$requiredAddressKeys[] without breaking things elsewhere?
What did you expect to happen?
Address to be formatted with the custom value entered in Localization > Countries > United States > Format
{address_1}\n{city}, {state} {postcode}\n{country}
Version
3.x
What browser are you seeing the problem on?
No response
Relevant log output
No response