Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
packed.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 
11 <div id="packed_window">
12 <?php foreach ($block->getPackages() as $packageId => $package): ?>
13  <?php $package = new \Magento\Framework\DataObject($package) ?>
14  <?php $params = new \Magento\Framework\DataObject($package->getParams()) ?>
15  <section class="admin__page-section">
16  <div class="admin__page-section-title">
17  <span class="title"><?= /* @escapeNotVerified */ __('Package') . ' ' . $packageId ?></span>
18  </div>
19  <div class="admin__page-section-content">
20  <div class="row row-gutter">
21  <div class="col-m-4">
22  <table class="admin__table-secondary">
23  <tbody>
24  <tr>
25  <th><?= /* @escapeNotVerified */ __('Type') ?></th>
26  <td><?= /* @escapeNotVerified */ $block->getContainerTypeByCode($params->getContainer()) ?></td>
27  </tr>
28  <tr>
29  <?php if ($block->displayCustomsValue()): ?>
30  <th><?= /* @escapeNotVerified */ __('Customs Value') ?></th>
31  <td><?= /* @escapeNotVerified */ $block->displayCustomsPrice($params->getCustomsValue()) ?></td>
32  <?php else: ?>
33  <th><?= /* @escapeNotVerified */ __('Total Weight') ?></th>
34  <td><?= /* @escapeNotVerified */ $params->getWeight() . ' ' . $this->helper('Magento\Shipping\Helper\Carrier')->getMeasureWeightName($params->getWeightUnits()) ?></td>
35  <?php endif; ?>
36  </tr>
37  <?php if ($params->getSize()): ?>
38  <tr>
39  <th><?= /* @escapeNotVerified */ __('Size') ?></th>
40  <td><?= /* @escapeNotVerified */ ucfirst(strtolower($params->getSize())) ?></td>
41  </tr>
42  <?php endif; ?>
43  </tbody>
44  </table>
45  </div>
46  <div class="col-m-4">
47  <table class="admin__table-secondary">
48  <tbody>
49  <tr>
50  <th><?= /* @escapeNotVerified */ __('Length') ?></th>
51  <td>
52  <?php if ($params->getLength() != null): ?>
53  <?= /* @escapeNotVerified */ $params->getLength() . ' ' . $this->helper('Magento\Shipping\Helper\Carrier')->getMeasureDimensionName($params->getDimensionUnits()) ?>
54  <?php else: ?>
55  --
56  <?php endif; ?>
57  </td>
58  </tr>
59  <tr>
60  <th><?= /* @escapeNotVerified */ __('Width') ?></th>
61  <td>
62  <?php if ($params->getWidth() != null): ?>
63  <?= /* @escapeNotVerified */ $params->getWidth() . ' ' . $this->helper('Magento\Shipping\Helper\Carrier')->getMeasureDimensionName($params->getDimensionUnits()) ?>
64  <?php else: ?>
65  --
66  <?php endif; ?>
67  </td>
68  </tr>
69  <tr>
70  <th><?= /* @escapeNotVerified */ __('Height') ?></th>
71  <td>
72  <?php if ($params->getHeight() != null): ?>
73  <?= /* @escapeNotVerified */ $params->getHeight() . ' ' . $this->helper('Magento\Shipping\Helper\Carrier')->getMeasureDimensionName($params->getDimensionUnits()) ?>
74  <?php else: ?>
75  --
76  <?php endif; ?>
77  </td>
78  </tr>
79  </tbody>
80  </table>
81  </div>
82  <div class="col-m-4">
83  <table class="admin__table-secondary">
84  <tbody>
85  <?php if ($params->getDeliveryConfirmation() != null): ?>
86  <tr>
87  <th><?= /* @escapeNotVerified */ __('Signature Confirmation') ?></th>
88  <td><?= /* @escapeNotVerified */ $block->getDeliveryConfirmationTypeByCode($params->getDeliveryConfirmation()) ?></td>
89  </tr>
90  <?php endif; ?>
91  <?php if ($params->getContentType() != null): ?>
92  <tr>
93  <th><?= /* @escapeNotVerified */ __('Contents') ?></th>
94  <?php if ($params->getContentType() == 'OTHER'): ?>
95  <td><?= $block->escapeHtml($params->getContentTypeOther()) ?></td>
96  <?php else: ?>
97  <td><?= /* @escapeNotVerified */ $block->getContentTypeByCode($params->getContentType()) ?></td>
98  <?php endif; ?>
99  </tr>
100  <?php endif; ?>
101  <?php if ($params->getGirth()): ?>
102  <tr>
103  <th><?= /* @escapeNotVerified */ __('Girth') ?></th>
104  <td><?= /* @escapeNotVerified */ $params->getGirth() . ' ' . $this->helper('Magento\Shipping\Helper\Carrier')->getMeasureDimensionName($params->getGirthDimensionUnits()) ?></td>
105  </tr>
106  <?php endif; ?>
107  </tbody>
108  </table>
109  </div>
110  </div>
111  </div>
112  <div class="admin__page-section-item-title">
113  <span class="title"><?= /* @escapeNotVerified */ __('Items in the Package') ?></span>
114  </div>
115  <div class="admin__table-wrapper">
116  <table class="data-table admin__table-primary">
117  <thead>
118  <tr class="headings">
119  <th class="col-product"><span><?= /* @escapeNotVerified */ __('Product') ?></span></th>
120  <th class="col-weight"><span><?= /* @escapeNotVerified */ __('Weight') ?></span></th>
121  <?php if ($block->displayCustomsValue()): ?>
122  <th class="col-custom"><span><?= /* @escapeNotVerified */ __('Customs Value') ?></span></th>
123  <?php endif; ?>
124  <th class="col-qty"><span><?= /* @escapeNotVerified */ __('Qty Ordered') ?></span></th>
125  <th class="col-qty"><span><?= /* @escapeNotVerified */ __('Qty') ?></span></th>
126  </tr>
127  </thead>
128  <tbody id="">
129  <?php foreach ($package->getItems() as $itemId => $item) : ?>
130  <?php $item = new \Magento\Framework\DataObject($item) ?>
131  <tr title="#" id="">
132  <td class="col-product">
133  <?= /* @escapeNotVerified */ $item->getName() ?>
134  </td>
135  <td class="col-weight">
136  <?= /* @escapeNotVerified */ $item->getWeight() ?>
137  </td>
138  <?php if ($block->displayCustomsValue()): ?>
139  <td class="col-custom"><?= /* @escapeNotVerified */ $block->displayCustomsPrice($item->getCustomsValue()) ?></td>
140  <?php endif; ?>
141  <td class="col-qty">
142  <?= /* @escapeNotVerified */ $block->getQtyOrderedItem($item->getOrderItemId()) ?>
143  </td>
144  <td class="col-qty">
145  <?= /* @escapeNotVerified */ $item->getQty()*1 ?>
146  </td>
147  </tr>
148  <?php endforeach; ?>
149  </tbody>
150  </table>
151  </div>
152  </section>
153 <?php endforeach; ?>
154 </div>
155 <script>
156  function showPackedWindow() {
157  jQuery('#packed_window').modal('openModal');
158  }
159 </script>
160 
161 <script type="text/x-magento-init">
162  {
163  "#packed_window": {
164  "Magento_Shipping/js/packages":{
165  "type":"slide",
166  "title":"<?= /* @escapeNotVerified */ __('Packages') ?>",
167  "url": "<?= /* @escapeNotVerified */ $block->getPrintButton() ?>"
168  }
169  }
170  }
171 </script>
if( $params->getSize())( 'Size') ?></th >< td ><? endif
Definition: packed.phtml:37
__()
Definition: __.php:13
$block
Definition: block.php:8
endforeach
Definition: packed.phtml:145
jQuery('.store-switcher .dropdown-menu li a').each(function()
Definition: switcher.phtml:203
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18