Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
renderer.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php
15 ?>
16 
17 <?php $_item = $block->getItem() ?>
18 <?php $items = array_merge([$_item], $_item->getChildrenItems()); ?>
19 <?php $_count = count ($items) ?>
20 <?php $_index = 0 ?>
21 
22 <?php $_prevOptionId = '' ?>
23 
24 <?php if($block->getOrderOptions() || $_item->getDescription() || $block->canDisplayGiftmessage()): ?>
25  <?php $_showlastRow = true ?>
26 <?php else: ?>
27  <?php $_showlastRow = false ?>
28 <?php endif; ?>
29 
30 <?php foreach ($items as $_item): ?>
31  <?php $block->setPriceDataObject($_item) ?>
32  <?php $attributes = $block->getSelectionAttributes($_item) ?>
33  <?php if ($_item->getParentItem()): ?>
34  <?php if ($_prevOptionId != $attributes['option_id']): ?>
35  <tr>
36  <td class="col-product"><div class="option-label"><?= /* @escapeNotVerified */ $attributes['option_label'] ?></div></td>
37  <td>&nbsp;</td>
38  <td>&nbsp;</td>
39  <td>&nbsp;</td>
40  <td>&nbsp;</td>
41  <td>&nbsp;</td>
42  <td>&nbsp;</td>
43  <td>&nbsp;</td>
44  <td>&nbsp;</td>
45  <td class="last">&nbsp;</td>
46  </tr>
47  <?php $_prevOptionId = $attributes['option_id'] ?>
48  <?php endif; ?>
49  <?php endif; ?>
50  <tr<?= (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?>>
51  <?php if (!$_item->getParentItem()): ?>
52  <td class="col-product">
53  <div class="product-title" id="order_item_<?= /* @escapeNotVerified */ $_item->getId() ?>_title">
54  <?= $block->escapeHtml($_item->getName()) ?>
55  </div>
56  <div class="product-sku-block">
57  <span><?= /* @escapeNotVerified */ __('SKU') ?>:</span>
58  <?= implode('<br />', $this->helper('Magento\Catalog\Helper\Data')->splitSku($block->escapeHtml($_item->getSku()))) ?>
59  </div>
60  </td>
61  <?php else: ?>
62  <td class="col-product">
63  <div class="option-value"><?= $block->getValueHtml($_item) ?></div>
64  </td>
65  <?php endif; ?>
66  <td class="col-status">
67  <?php if ($block->canShowPriceInfo($_item)): ?>
68  <?= /* @escapeNotVerified */ $_item->getStatus() ?>
69  <?php else: ?>
70  &nbsp;
71  <?php endif; ?>
72  </td>
73  <td class="col-price-original">
74  <?php if ($block->canShowPriceInfo($_item)): ?>
75  <?= /* @escapeNotVerified */ $block->displayPriceAttribute('original_price') ?>
76  <?php else: ?>
77  &nbsp;
78  <?php endif; ?>
79  </td>
80  <td class="col-price">
81  <?php if ($block->canShowPriceInfo($_item)): ?>
82  <?= $block->getColumnHtml($_item, 'price') ?>
83  <?php else: ?>
84  &nbsp;
85  <?php endif; ?>
86  </td>
87  <td class="col-ordered-qty">
88  <?php if ($block->canShowPriceInfo($_item)): ?>
89  <table class="qty-table">
90  <tr>
91  <th><?= /* @escapeNotVerified */ __('Ordered') ?></th>
92  <td><?= /* @escapeNotVerified */ $_item->getQtyOrdered()*1 ?></td>
93  </tr>
94  <?php if ((float) $_item->getQtyInvoiced()): ?>
95  <tr>
96  <th><?= /* @escapeNotVerified */ __('Invoiced') ?></th>
97  <td><?= /* @escapeNotVerified */ $_item->getQtyInvoiced()*1 ?></td>
98  </tr>
99  <?php endif; ?>
100  <?php if ((float) $_item->getQtyShipped() && $block->isShipmentSeparately($_item)): ?>
101  <tr>
102  <th><?= /* @escapeNotVerified */ __('Shipped') ?></th>
103  <td><?= /* @escapeNotVerified */ $_item->getQtyShipped()*1 ?></td>
104  </tr>
105  <?php endif; ?>
106  <?php if ((float) $_item->getQtyRefunded()): ?>
107  <tr>
108  <th><?= /* @escapeNotVerified */ __('Refunded') ?></th>
109  <td><?= /* @escapeNotVerified */ $_item->getQtyRefunded()*1 ?></td>
110  </tr>
111  <?php endif; ?>
112  <?php if ((float) $_item->getQtyCanceled()): ?>
113  <tr>
114  <th><?= /* @escapeNotVerified */ __('Canceled') ?></th>
115  <td><?= /* @escapeNotVerified */ $_item->getQtyCanceled()*1 ?></td>
116  </tr>
117  <?php endif; ?>
118  </table>
119  <?php elseif ($block->isShipmentSeparately($_item)): ?>
120  <table class="qty-table">
121  <tr>
122  <th><?= /* @escapeNotVerified */ __('Ordered') ?></th>
123  <td><?= /* @escapeNotVerified */ $_item->getQtyOrdered()*1 ?></td>
124  </tr>
125  <?php if ((float) $_item->getQtyShipped()): ?>
126  <tr>
127  <th><?= /* @escapeNotVerified */ __('Shipped') ?></th>
128  <td><?= /* @escapeNotVerified */ $_item->getQtyShipped()*1 ?></td>
129  </tr>
130  <?php endif; ?>
131  </table>
132  <?php else: ?>
134  <?php endif; ?>
135  </td>
136  <td class="col-subtotal">
137  <?php if ($block->canShowPriceInfo($_item)): ?>
138  <?= $block->getColumnHtml($_item, 'subtotal') ?>
139  <?php else: ?>
140  &nbsp;
141  <?php endif; ?>
142  </td>
143  <td class="col-tax-amount">
144  <?php if ($block->canShowPriceInfo($_item)): ?>
145  <?= /* @escapeNotVerified */ $block->displayPriceAttribute('tax_amount') ?>
146  <?php else: ?>
147  &nbsp;
148  <?php endif; ?>
149  </td>
150  <td class="col-tax-percent">
151  <?php if ($block->canShowPriceInfo($_item)): ?>
152  <?= /* @escapeNotVerified */ $block->displayTaxPercent($_item) ?>
153  <?php else: ?>
154  &nbsp;
155  <?php endif; ?>
156  </td>
157  <td class="col-discont">
158  <?php if ($block->canShowPriceInfo($_item)): ?>
159  <?= /* @escapeNotVerified */ $block->displayPriceAttribute('discount_amount') ?>
160  <?php else: ?>
161  &nbsp;
162  <?php endif; ?>
163  </td>
164  <td class="col-total last">
165  <?php if ($block->canShowPriceInfo($_item)): ?>
166  <?= $block->getColumnHtml($_item, 'total') ?>
167  <?php else: ?>
168  &nbsp;
169  <?php endif; ?>
170  </td>
171  </tr>
172 <?php endforeach; ?>
173 <?php if($_showlastRow): ?>
174  <tr<?php if (!$block->canDisplayGiftmessage()) echo ' class="border"' ?>>
175  <td class="col-product">
176  <?php if ($block->getOrderOptions()): ?>
177  <dl class="item-options">
178  <?php foreach ($block->getOrderOptions() as $option): ?>
179  <dt><?= /* @escapeNotVerified */ $option['label'] ?>:</dt>
180  <dd>
181  <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
182  <?= /* @escapeNotVerified */ $option['value'] ?>
183  <?php else: ?>
184  <?= $block->truncateString($option['value'], 55, '', $_remainder) ?>
185  <?php if ($_remainder):?>
186  ... <span id="<?= /* @escapeNotVerified */ $_id = 'id' . uniqid() ?>"><?= /* @escapeNotVerified */ $_remainder ?></span>
187  <script>
188 require(['prototype'], function(){
189 
190  $('<?= /* @escapeNotVerified */ $_id ?>').hide();
191  $('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseover', function(){$('<?= /* @escapeNotVerified */ $_id ?>').show();});
192  $('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseout', function(){$('<?= /* @escapeNotVerified */ $_id ?>').hide();});
193 
194 });
195 </script>
196  <?php endif;?>
197  <?php endif;?>
198  </dd>
199  <?php endforeach; ?>
200  </dl>
201  <?php else: ?>
203  <?php endif; ?>
204  <?= $block->escapeHtml($_item->getDescription()) ?>
205  </td>
206  <td>&nbsp;</td>
207  <td>&nbsp;</td>
208  <td>&nbsp;</td>
209  <td>&nbsp;</td>
210  <td>&nbsp;</td>
211  <td>&nbsp;</td>
212  <td>&nbsp;</td>
213  <td>&nbsp;</td>
214  <td class="last">&nbsp;</td>
215  </tr>
216 <?php endif; ?>
</td ></tr > $_prevOptionId endif
Definition: renderer.phtml:46
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$_item $items
Definition: renderer.phtml:18
endforeach
Definition: renderer.phtml:175
__()
Definition: __.php:13
$block
Definition: block.php:8
$_count $_index $_prevOptionId if($block->getOrderOptions()|| $_item->getDescription()) foreach( $items as $_item)( $_item) ?><?php $attributes if( $_item->getOrderItem() ->getParentItem())($_prevOptionId !=$attributes['option_id'])</td >< td > & nbsp
Definition: renderer.phtml:33
$_item
Definition: default.phtml:11
$attributes
Definition: matrix.phtml:13
$_count
Definition: left.phtml:19