Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
minicart.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 
12 <div data-block="minicart" class="minicart-wrapper">
13  <a class="action showcart" href="<?= /* @escapeNotVerified */ $block->getShoppingCartUrl() ?>"
14  data-bind="scope: 'minicart_content'">
15  <span class="text"><?= /* @escapeNotVerified */ __('My Cart') ?></span>
16  <span class="counter qty empty"
17  data-bind="css: { empty: !!getCartParam('summary_count') == false }, blockLoader: isLoading">
18  <span class="counter-number"><!-- ko text: getCartParam('summary_count') --><!-- /ko --></span>
19  <span class="counter-label">
20  <!-- ko if: getCartParam('summary_count') -->
21  <!-- ko text: getCartParam('summary_count') --><!-- /ko -->
22  <!-- ko i18n: 'items' --><!-- /ko -->
23  <!-- /ko -->
24  </span>
25  </span>
26  </a>
27  <?php if ($block->getIsNeedToDisplaySideBar()): ?>
28  <div class="block block-minicart"
29  data-role="dropdownDialog"
30  data-mage-init='{"dropdownDialog":{
31  "appendTo":"[data-block=minicart]",
32  "triggerTarget":".showcart",
33  "timeout": "2000",
34  "closeOnMouseLeave": false,
35  "closeOnEscape": true,
36  "triggerClass":"active",
37  "parentClass":"active",
38  "buttons":[]}}'>
39  <div id="minicart-content-wrapper" data-bind="scope: 'minicart_content'">
40  <!-- ko template: getTemplate() --><!-- /ko -->
41  </div>
42  <?= $block->getChildHtml('minicart.addons') ?>
43  </div>
44  <?php endif ?>
45  <script>
46  window.checkout = <?= /* @escapeNotVerified */ $block->getSerializedConfig() ?>;
47  </script>
48  <script type="text/x-magento-init">
49  {
50  "[data-block='minicart']": {
51  "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
52  },
53  "*": {
54  "Magento_Ui/js/block-loader": "<?= /* @escapeNotVerified */ $block->getViewFileUrl('images/loader-1.gif') ?>"
55  }
56  }
57  </script>
58 </div>
59 
60 
if( $form)() ?>< script > require(['jquery' mage mage
Definition: save.phtml:15
__()
Definition: __.php:13
$block
Definition: block.php:8
endif
Definition: 404.phtml:116