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 
10 ?>
11 <div class="customer-current-activity-inner">
12  <h4 class="customer-activity-title"><?= /* @escapeNotVerified */ __('Customer\'s Activities') ?></h4>
13  <div class="create-order-sidebar-container">
14  <?= $block->getChildHtml('top_button') ?>
15  <?php foreach ($block->getLayout()->getChildBlocks($block->getNameInLayout()) as $_alias => $_child): ?>
16  <?php if ($_alias != 'top_button' && $_alias != 'bottom_button'): ?>
17  <?php if ($block->canDisplay($_child)): ?>
18  <div class="order-sidebar-block" id="order-sidebar_<?= /* @escapeNotVerified */ $_alias ?>">
19  <?= $block->getChildHtml($_alias) ?>
20  </div>
21  <?php endif; ?>
22  <?php endif; ?>
23  <?php endforeach; ?>
24  <?= $block->getChildHtml('bottom_button') ?>
25  </div>
26 </div>
27 <script>
28 require([
29  "prototype",
30  "Magento_Catalog/catalog/product/composite/configure"
31 ], function(){
32 
33  function addSidebarCompositeListType() {
34  productConfigure.addListType('sidebar', {
35  urlFetch: '<?= /* @escapeNotVerified */ $block->getUrl('sales/order_create/configureProductToAdd') ?>',
36  urlConfirm: '<?= /* @escapeNotVerified */ $block->getUrl('sales/order_create/addConfigured') ?>'
37  });
38  productConfigure.addListType('sidebar_wishlist', {
39  urlFetch: '<?= /* @escapeNotVerified */ $block->getUrl('customer/wishlist_product_composite_wishlist/configure') ?>',
40  urlConfirm: '<?= /* @escapeNotVerified */ $block->getUrl('sales/order_create/addConfigured') ?>'
41  });
42  }
43 
44  if (typeof(sidebarListTypeWorkedOn) == 'undefined') {
45  sidebarListTypeWorkedOn = false;
46  }
47  if (!sidebarListTypeWorkedOn) {
48  if (typeof(productConfigure) == 'undefined') {
49  Event.observe(window, 'load', function(){
50  setTimeout(addSidebarCompositeListType, 10);
51  })
52  } else {
53  addSidebarCompositeListType();
54  }
55  sidebarListTypeWorkedOn = true;
56  }
57 
58  window.addSidebarCompositeListType = addSidebarCompositeListType;
59 });
60 </script>
endforeach
Definition: sidebar.phtml:23
__()
Definition: __.php:13
$block
Definition: block.php:8
endif
Definition: sidebar.phtml:22