Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
sidebar.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
11 $item = $block->getItem();
12 
13 // ensure we use the zone for the shopping cart / minicart
14 $originalZone = $block->getZone();
15 $block->setZone(\Magento\Framework\Pricing\Render::ZONE_CART);
16 ?>
17 
18 <?php if ($block->displayPriceInclTax() || $block->displayBothPrices()): ?>
19  <span class="price-including-tax" data-label="<?= $block->escapeHtml(__('Incl. Tax')) ?>">
20  <?php if ($block->displayPriceWithWeeeDetails()): ?>
21  <span class="minicart-tax-total">
22  <?php else: ?>
23  <span class="minicart-price">
24  <?php endif; ?>
25  <?= /* @escapeNotVerified */ $block->formatPrice($block->getUnitDisplayPriceInclTax()) ?>
26  </span>
27 
28  <?php if ($block->displayPriceWithWeeeDetails()): ?>
29  <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($item)): ?>
30  <span class="minicart-tax-info">
31  <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($item) as $tax): ?>
32  <span class="weee" data-label="<?= /* @escapeNotVerified */ $tax['title'] ?>">
33  <?= /* @escapeNotVerified */ $block->formatPrice($tax['amount_incl_tax'], true, true) ?>
34  </span>
35  <?php endforeach; ?>
36  </span>
37 
38  <?php if ($block->displayFinalPrice()): ?>
39  <span class="minicart-tax-total">
40  <span class="weee" data-label="<?= $block->escapeHtml(__('Total Incl. Tax')) ?>">
41  <?= /* @escapeNotVerified */ $block->formatPrice($block->getFinalUnitDisplayPriceInclTax()) ?>
42  </span>
43  </span>
44  <?php endif; ?>
45  <?php endif; ?>
46  <?php endif; ?>
47  </span>
48 <?php endif; ?>
49 
50 <?php if ($block->displayPriceExclTax() || $block->displayBothPrices()): ?>
51  <span class="price-excluding-tax" data-label="<?= $block->escapeHtml(__('Excl. Tax')) ?>">
52  <?php if ($block->displayPriceWithWeeeDetails()): ?>
53  <span class="minicart-tax-total">
54  <?php else: ?>
55  <span class="minicart-price">
56  <?php endif; ?>
57  <?= /* @escapeNotVerified */ $block->formatPrice($block->getUnitDisplayPriceExclTax()) ?>
58  </span>
59 
60  <?php if ($block->displayPriceWithWeeeDetails()): ?>
61  <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($item)): ?>
62  <span class="minicart-tax-info">
63  <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($item) as $tax): ?>
64  <span class="weee" data-label="<?= /* @escapeNotVerified */ $tax['title'] ?>">
65  <?= /* @escapeNotVerified */ $block->formatPrice($tax['amount'], true, true) ?>
66  </span>
67  <?php endforeach; ?>
68  </span>
69 
70  <?php if ($block->displayFinalPrice()): ?>
71  <span class="minicart-tax-total">
72  <span class="weee" data-label="<?= $block->escapeHtml(__('Total')) ?>">
73  <?= /* @escapeNotVerified */ $block->formatPrice($block->getFinalUnitDisplayPriceExclTax()) ?>
74  </span>
75  </span>
76  <?php endif; ?>
77  <?php endif; ?>
78  <?php endif; ?>
79  </span>
80 <?php endif; ?>
81 <?php $block->setZone($originalZone); ?>
endforeach
Definition: sidebar.phtml:23
$block
Definition: block.php:8
$originalZone
Definition: sidebar.phtml:14
$item
Definition: sidebar.phtml:11
endif
Definition: sidebar.phtml:22