Skip to content

Commit

Permalink
ENGCOM-4812: Fix #20111 - display variables in popup while editing ex…
Browse files Browse the repository at this point in the history
…isting email template #22469

 - Merge Pull Request #22469 from Bartlomiejsz/magento2:feature/fix_20111_email_template_variables
 - Merged commits:
   1. 7d584ac
  • Loading branch information
magento-engcom-team committed Apr 23, 2019
2 parents 18dc53f + 7d584ac commit 79ced09
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 79ced09

Please sign in to comment.