Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
discount.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php $_source = $block->getSource() ?>
11 <?php $_order = $block->getOrder() ?>
12 <?php $block->setPriceDataObject($_source) ?>
13 
14 <?php if ((float) $_source->getDiscountAmount()): ?>
15  <tr>
16  <td class="label">
17  <?php if ($_order->getCouponCode()): ?>
18  <?= /* @escapeNotVerified */ __('Discount (%1)', $_order->getCouponCode()) ?>
19  <?php else: ?>
20  <?= /* @escapeNotVerified */ __('Discount') ?>
21  <?php endif; ?>
22  </td>
23  <td><?= /* @escapeNotVerified */ $block->displayPriceAttribute('discount_amount') ?></td>
24  </tr>
25 <?php endif; ?>
$parentItem $_order
Definition: default.phtml:12
__()
Definition: __.php:13
endif
Definition: discount.phtml:23
$block
Definition: block.php:8
$_source
Definition: tax.phtml:13