Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
total.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php
13 $_weeeHelper = $this->helper('Magento\Weee\Helper\Data');
14 $_item = $block->getItem();
15 ?>
16 
17 <?php if ($block->displayPriceExclTax() || $block->displayBothPrices()): ?>
18  <?php $_rowTotalWithoutDiscount = $block->getRowDisplayPriceExclTax() - $_item->getTotalDiscountAmount(); ?>
19  <?php if ($block->displayBothPrices()): ?>
20  <span class="label"><?= /* @escapeNotVerified */ __('Excl. Tax') ?>:</span>
21  <?php endif; ?>
22  <?= /* @escapeNotVerified */ $block->formatPrice(max(0, $_rowTotalWithoutDiscount)) ?>
23 
24 
25  <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?>
26  <br />
27  <?php if ($block->displayPriceWithWeeeDetails()): ?>
28  <small>
29  <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?>
30  <span class="nobr"><?= /* @escapeNotVerified */ $tax['title'] ?>: <?= /* @escapeNotVerified */ $block->formatPrice($tax['row_amount'], true, true) ?></span><br />
31  <?php endforeach; ?>
32  </small>
33  <?php endif; ?>
34 
35  <?php if ($block->displayFinalPrice()): ?>
36  <br />
37  <span class="nobr"><?= /* @escapeNotVerified */ __('Total') ?>:<br />
38  <?= /* @escapeNotVerified */ $block->formatPrice($block->getFinalRowDisplayPriceExclTax() - $_item->getTotalDiscountAmount()) ?>
39  </span>
40  <?php endif; ?>
41  <?php endif; ?>
42 <?php endif; ?>
43 
44 
45 <?php if ($block->displayPriceInclTax() || $block->displayBothPrices()): ?>
46  <?php if ($block->displayBothPrices()): ?>
47  <br /><span class="label"><?= /* @escapeNotVerified */ __('Incl. Tax') ?>:</span>
48  <?php endif; ?>
49  <?php $_incl = $block->getTotalAmount($_item); ?>
50  <?= /* @escapeNotVerified */ $block->formatPrice(max(0, $_incl)) ?>
51  <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?>
52  <br />
53  <?php if ($block->displayPriceWithWeeeDetails()): ?>
54  <small>
55  <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?>
56  <span class="nobr"><?= /* @escapeNotVerified */ $tax['title'] ?>: <?= /* @escapeNotVerified */ $block->formatPrice($tax['row_amount_incl_tax'], true, true) ?></span><br />
57  <?php endforeach; ?>
58  </small>
59  <?php endif; ?>
60 
61  <?php if ($block->displayFinalPrice()): ?>
62  <span class="nobr"><?= /* @escapeNotVerified */ __('Total Incl. Tax') ?>:<br />
63  <?= /* @escapeNotVerified */ $block->formatPrice($block->getFinalRowDisplayPriceInclTax() - $_item->getTotalDiscountAmount()) ?>
64  </span>
65  <?php endif; ?>
66  <?php endif; ?>
67 <?php endif; ?>
$_item
Definition: total.phtml:13
foreach( $this->main as $item) endforeach
Definition: side-menu.phtml:10
__()
Definition: __.php:13
if( $block->displayPriceInclTax()||$block->displayBothPrices())( $block->displayBothPrices( $block->getStore()))('Incl. Tax') ?> $_incl
Definition: total.phtml:29
$block
Definition: block.php:8
$_rowTotalWithoutDiscount
Definition: total.phtml:16
$_weeeHelper
Definition: total.phtml:13
if( $block->displayBothPrices())('Excl. Tax') ?> endif
Definition: total.phtml:21