Skip to content

Commit 7d584ac

Browse files
committed
Fix #20111 - display variables in popup while editing existing email template
1 parent 45a6365 commit 7d584ac

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

app/code/Magento/Email/Model/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public function getVariablesOptionArray($withGroup = false)
326326
$optionArray[] = ['value' => '{{' . $value . '}}', 'label' => __('%1', $label)];
327327
}
328328
if ($withGroup) {
329-
$optionArray = ['label' => __('Template Variables'), 'value' => $optionArray];
329+
$optionArray = [['label' => __('Template Variables'), 'value' => $optionArray]];
330330
}
331331
}
332332
return $optionArray;

app/code/Magento/Email/Test/Unit/Model/TemplateTest.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -598,16 +598,18 @@ public function getVariablesOptionArrayDataProvider()
598598
'label' => __('Template Variables'),
599599
'value' => [
600600
[
601-
'value' => '{{store url=""}}',
602-
'label' => __('%1', 'Store Url'),
603-
],
604-
[
605-
'value' => '{{var logo_url}}',
606-
'label' => __('%1', 'Email Logo Image Url'),
607-
],
608-
[
609-
'value' => '{{var customer.name}}',
610-
'label' => __('%1', 'Customer Name'),
601+
[
602+
'value' => '{{store url=""}}',
603+
'label' => __('%1', 'Store Url'),
604+
],
605+
[
606+
'value' => '{{var logo_url}}',
607+
'label' => __('%1', 'Email Logo Image Url'),
608+
],
609+
[
610+
'value' => '{{var customer.name}}',
611+
'label' => __('%1', 'Customer Name'),
612+
],
611613
],
612614
],
613615
],

0 commit comments

Comments
 (0)