@@ -31,32 +31,32 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn
3131 /**
3232 * Default design area for emulation
3333 */
34- const DEFAULT_DESIGN_AREA = 'frontend ' ;
34+ public const DEFAULT_DESIGN_AREA = 'frontend ' ;
3535
3636 /**
3737 * Default path to email logo
3838 */
39- const DEFAULT_LOGO_FILE_ID = 'Magento_Email::logo_email.png ' ;
39+ public const DEFAULT_LOGO_FILE_ID = 'Magento_Email::logo_email.png ' ;
4040
4141 /**
4242 * Email logo url
4343 */
44- const XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo ' ;
44+ public const XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo ' ;
4545
4646 /**
4747 * Email logo alt text
4848 */
49- const XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt ' ;
49+ public const XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt ' ;
5050
5151 /**
5252 * Email logo width
5353 */
54- const XML_PATH_DESIGN_EMAIL_LOGO_WIDTH = 'design/email/logo_width ' ;
54+ public const XML_PATH_DESIGN_EMAIL_LOGO_WIDTH = 'design/email/logo_width ' ;
5555
5656 /**
5757 * Email logo height
5858 */
59- const XML_PATH_DESIGN_EMAIL_LOGO_HEIGHT = 'design/email/logo_height ' ;
59+ public const XML_PATH_DESIGN_EMAIL_LOGO_HEIGHT = 'design/email/logo_height ' ;
6060
6161 /**
6262 * Configuration of design package for template
@@ -144,8 +144,6 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn
144144 protected $ filesystem ;
145145
146146 /**
147- * Scope config
148- *
149147 * @var \Magento\Framework\App\Config\ScopeConfigInterface
150148 */
151149 protected $ scopeConfig ;
@@ -361,24 +359,11 @@ public function getProcessedTemplate(array $variables = [])
361359 $ variables = $ this ->addEmailVariables ($ variables , $ storeId );
362360 $ processor ->setVariables ($ variables );
363361
364- // Type legacy id strict
365- // db legacy true numeric false
366- // db new false numeric true
367- // filesystem false string false
368- // preview false null true
369- $ isLegacy = $ this ->getData ('is_legacy ' );
370- $ templateId = $ this ->getTemplateId ();
371- $ previousStrictMode = $ processor ->setStrictMode (
372- !$ isLegacy && (is_numeric ($ templateId ) || empty ($ templateId ))
373- );
374-
375362 try {
376363 $ result = $ processor ->filter ($ this ->getTemplateText ());
377364 } catch (\Exception $ e ) {
378365 $ this ->cancelDesignConfig ();
379366 throw new \LogicException (__ ($ e ->getMessage ()), $ e ->getCode (), $ e );
380- } finally {
381- $ processor ->setStrictMode ($ previousStrictMode );
382367 }
383368
384369 if ($ isDesignApplied ) {
@@ -468,6 +453,8 @@ protected function addEmailVariables($variables, $storeId)
468453 if (!isset ($ variables ['store ' ])) {
469454 $ variables ['store ' ] = $ store ;
470455 }
456+ $ storeAddress = $ variables ['store ' ]->getFormattedAddress ();
457+ $ variables ['store ' ]->setData ('formatted_address ' , $ storeAddress );
471458 if (!isset ($ variables ['store ' ]['frontend_name ' ])) {
472459 $ variables ['store ' ]['frontend_name ' ] = $ store ->getFrontendName ();
473460 }
0 commit comments