Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
tax.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 $taxAmount = $block->getTotal()->getValue();
10 ?>
11 <?php if (($taxAmount == 0 && $this->helper('Magento\Tax\Helper\Data')->displayZeroTax()) || ($taxAmount > 0)): ?>
12 <?php global $taxIter; $taxIter++; ?>
13 <?php $class = "{$block->getTotal()->getCode()} " . ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() ? 'summary-total' : ''); ?>
14 <tr<?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?>
15  onclick="expandDetails(this, '.summary-details-<?= /* @escapeNotVerified */ $taxIter ?>')"
16 <?php endif; ?>
17  class="<?= /* @escapeNotVerified */ $class ?> row-totals">
18  <td style="<?= /* @escapeNotVerified */ $block->getTotal()->getStyle() ?>" class="admin__total-mark" colspan="<?= /* @escapeNotVerified */ $block->getColspan() ?>">
19  <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?>
20  <div class="summary-collapse"><?= /* @escapeNotVerified */ $block->getTotal()->getTitle() ?></div>
21  <?php else: ?>
22  <?= /* @escapeNotVerified */ $block->getTotal()->getTitle() ?>
23  <?php endif;?>
24  </td>
25  <td style="<?= /* @escapeNotVerified */ $block->getTotal()->getStyle() ?>" class="admin__total-amount"><?= /* @escapeNotVerified */ $block->formatPrice($block->getTotal()->getValue()) ?></td>
26 </tr>
27 <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?>
28  <?php $isTop = 1; ?>
29  <?php foreach ($block->getTotal()->getFullInfo() as $info): ?>
30  <?php if (isset($info['hidden']) && $info['hidden']) {
31  continue;
32  } ?>
33  <?php $percent = $info['percent']; ?>
34  <?php $amount = $info['amount']; ?>
35  <?php $rates = $info['rates']; ?>
36  <?php $isFirst = 1; ?>
37 
38  <?php foreach ($rates as $rate): ?>
39  <tr class="summary-details-<?= /* @escapeNotVerified */ $taxIter ?> summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>" style="display:none;">
40  <td class="admin__total-mark" style="<?= /* @escapeNotVerified */ $block->getTotal()->getStyle() ?>" colspan="<?= /* @escapeNotVerified */ $block->getColspan() ?>">
41  <?= $block->escapeHtml($rate['title']) ?>
42  <?php if (!is_null($rate['percent'])): ?>
43  (<?= (float)$rate['percent'] ?>%)
44  <?php endif; ?>
45  <br />
46  </td>
47  <?php if ($isFirst): ?>
48  <td style="<?= /* @escapeNotVerified */ $block->getTotal()->getStyle() ?>" class="admin__total-amount" rowspan="<?= count($rates) ?>">
49  <?= /* @escapeNotVerified */ $block->formatPrice($amount) ?>
50  </td>
51  <?php endif; ?>
52  </tr>
53  <?php $isFirst = 0; ?>
54  <?php $isTop = 0; ?>
55  <?php endforeach; ?>
56  <?php endforeach; ?>
57 <?php endif;?>
58 <?php endif;?>
59 
if($this->helper('Magento\Tax\Helper\Data') ->displayFullSummary()) foreach( $block->getTotal() ->getFullInfo() as $info)(isset($info['hidden']) && $info['hidden']) $percent
Definition: tax.phtml:33
$amount
Definition: tax.phtml:34
$rates
Definition: tax.phtml:35
$block
Definition: block.php:8
$taxAmount
Definition: tax.phtml:9
$isTop
Definition: tax.phtml:54
$class
Definition: tax.phtml:13
endforeach
Definition: tax.phtml:55
foreach( $rates as $rate)($isTop) endif
Definition: tax.phtml:38
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52
$isFirst
Definition: tax.phtml:36
if(($taxAmount==0 && $this->helper('Magento\Tax\Helper\Data') ->displayZeroTax())||($taxAmount > 0)) $taxIter
Definition: tax.phtml:11