You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try to customise the address format in the mail footer
Expected result
you can customise the address format in the mail footer, for example putting the zip code in front of the city, as used in some European countries
Actual result
you cannot (easily) customise the address format as it is hardcoded:
/**
* Format address in a specific way
*
* @param DataObject $storeInfo
* @param string $type
* @return string
*/
public function format(DataObject $storeInfo, $type = 'html')
{
$this->eventManager->dispatch('store_address_format', ['type' => $type, 'store_info' => $storeInfo]);
$address = $this->filterManager->template(
"{{var name}}\n{{var street_line1}}\n{{depend street_line2}}{{var street_line2}}\n{{/depend}}"
. "{{var city}}, {{var region}} {{var postcode}},\n{{var country}}",
['variables' => $storeInfo->getData()]
);
if ($type == 'html') {
$address = nl2br($address);
}
return $address;
}
sure, we could use an interceptor and completely forgo the current implementation, but really? at the least please add the template string into the event so it could be manipulated in an observer...
The text was updated successfully, but these errors were encountered:
Preconditions
Steps to reproduce
Expected result
Actual result
sure, we could use an interceptor and completely forgo the current implementation, but really? at the least please add the template string into the event so it could be manipulated in an observer...
The text was updated successfully, but these errors were encountered: