Skip to content

Commit

Permalink
Fix #20111 - display variables in popup while editing existing email …
Browse files Browse the repository at this point in the history
…template
  • Loading branch information
Bartlomiejsz committed Apr 23, 2019
1 parent 45a6365 commit 7d584ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Email/Model/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public function getVariablesOptionArray($withGroup = false)
$optionArray[] = ['value' => '{{' . $value . '}}', 'label' => __('%1', $label)];
}
if ($withGroup) {
$optionArray = ['label' => __('Template Variables'), 'value' => $optionArray];
$optionArray = [['label' => __('Template Variables'), 'value' => $optionArray]];
}
}
return $optionArray;
Expand Down
22 changes: 12 additions & 10 deletions app/code/Magento/Email/Test/Unit/Model/TemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,16 +598,18 @@ public function getVariablesOptionArrayDataProvider()
'label' => __('Template Variables'),
'value' => [
[
'value' => '{{store url=""}}',
'label' => __('%1', 'Store Url'),
],
[
'value' => '{{var logo_url}}',
'label' => __('%1', 'Email Logo Image Url'),
],
[
'value' => '{{var customer.name}}',
'label' => __('%1', 'Customer Name'),
[
'value' => '{{store url=""}}',
'label' => __('%1', 'Store Url'),
],
[
'value' => '{{var logo_url}}',
'label' => __('%1', 'Email Logo Image Url'),
],
[
'value' => '{{var customer.name}}',
'label' => __('%1', 'Customer Name'),
],
],
],
],
Expand Down

0 comments on commit 7d584ac

Please sign in to comment.