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 = $block->getChildren($_item); ?>
19 <?php $_count = count($items) ?>
20 <?php $_index = 0 ?>
21 
22 <?php $_prevOptionId = '' ?>
23 
24 <?php if ($block->getOrderOptions() || $_item->getDescription()): ?>
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 if ($_item->getOrderItem()->getParentItem()): ?>
33  <?php $attributes = $block->getSelectionAttributes($_item) ?>
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 class="last">&nbsp;</td>
44  </tr>
45  <?php $_prevOptionId = $attributes['option_id'] ?>
46  <?php endif; ?>
47  <?php endif; ?>
48  <tr<?= (++$_index == $_count && !$_showlastRow) ? ' class="border"' : '' ?>>
49  <?php if (!$_item->getOrderItem()->getParentItem()): ?>
50  <td class="col-product">
51  <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
52  <div class="product-sku-block">
53  <span><?= /* @escapeNotVerified */ __('SKU') ?>:</span>
54  <?= implode('<br />', $this->helper('Magento\Catalog\Helper\Data')->splitSku($block->escapeHtml($_item->getSku()))) ?>
55  </div>
56  </td>
57  <?php else: ?>
58  <td class="col-product">
59  <div class="option-value"><?= $block->getValueHtml($_item) ?></div>
60  </td>
61  <?php endif; ?>
62  <td class="col-price">
63  <?php if ($block->canShowPriceInfo($_item)): ?>
64  <?= $block->getColumnHtml($_item, 'price') ?>
65  <?php else: ?>
66  &nbsp;
67  <?php endif; ?>
68  </td>
69  <td class="col-qty">
70  <?php if ($block->canShowPriceInfo($_item)): ?>
71  <table class="qty-table">
72  <tr>
73  <th><?= /* @escapeNotVerified */ __('Ordered') ?></th>
74  <td><span><?= /* @escapeNotVerified */ $_item->getOrderItem()->getQtyOrdered()*1 ?></span></td>
75  </tr>
76  <?php if ((float) $_item->getOrderItem()->getQtyInvoiced()): ?>
77  <tr>
78  <th><?= /* @escapeNotVerified */ __('Invoiced') ?></th>
79  <td><?= /* @escapeNotVerified */ $_item->getOrderItem()->getQtyInvoiced()*1 ?></td>
80  </tr>
81  <?php endif; ?>
82  <?php if ((float) $_item->getOrderItem()->getQtyShipped() && $block->isShipmentSeparately($_item)): ?>
83  <tr>
84  <th><?= /* @escapeNotVerified */ __('Shipped') ?></th>
85  <td><?= /* @escapeNotVerified */ $_item->getOrderItem()->getQtyShipped()*1 ?></td>
86  </tr>
87  <?php endif; ?>
88  <?php if ((float) $_item->getOrderItem()->getQtyRefunded()): ?>
89  <tr>
90  <th><?= /* @escapeNotVerified */ __('Refunded') ?></th>
91  <td><?= /* @escapeNotVerified */ $_item->getOrderItem()->getQtyRefunded()*1 ?></td>
92  </tr>
93  <?php endif; ?>
94  <?php if ((float) $_item->getOrderItem()->getQtyCanceled()): ?>
95  <tr>
96  <th><?= /* @escapeNotVerified */ __('Canceled') ?></th>
97  <td><?= /* @escapeNotVerified */ $_item->getOrderItem()->getQtyCanceled()*1 ?></td>
98  </tr>
99  <?php endif; ?>
100  </table>
101  <?php elseif ($block->isShipmentSeparately($_item)): ?>
102  <table class="qty-table">
103  <tr>
104  <th><?= /* @escapeNotVerified */ __('Ordered') ?></th>
105  <td><?= /* @escapeNotVerified */ $_item->getOrderItem()->getQtyOrdered()*1 ?></td>
106  </tr>
107  <?php if ((float) $_item->getOrderItem()->getQtyShipped()): ?>
108  <tr>
109  <th><?= /* @escapeNotVerified */ __('Shipped') ?></th>
110  <td><?= /* @escapeNotVerified */ $_item->getOrderItem()->getQtyShipped()*1 ?></td>
111  </tr>
112  <?php endif; ?>
113  </table>
114  <?php else: ?>
116  <?php endif; ?>
117  </td>
118  <td class="col-qty-invoice">
119  <?php if ($block->canShowPriceInfo($_item)): ?>
120  <?php if ($block->canEditQty()) : ?>
121  <input type="text"
122  class="input-text admin__control-text qty-input"
123  name="invoice[items][<?= /* @escapeNotVerified */ $_item->getOrderItemId() ?>]"
124  value="<?= /* @escapeNotVerified */ $_item->getQty()*1 ?>" />
125  <?php else : ?>
126  <?= /* @escapeNotVerified */ $_item->getQty()*1 ?>
127  <?php endif; ?>
128  <?php else: ?>
130  <?php endif; ?>
131  </td>
132  <td class="col-subtotal">
133  <?php if ($block->canShowPriceInfo($_item)): ?>
134  <?= $block->getColumnHtml($_item, 'subtotal') ?>
135  <?php else: ?>
136  &nbsp;
137  <?php endif; ?>
138  </td>
139  <td class="col-tax">
140  <?php if ($block->canShowPriceInfo($_item)): ?>
141  <?= /* @escapeNotVerified */ $block->displayPriceAttribute('tax_amount') ?>
142  <?php else: ?>
143  &nbsp;
144  <?php endif; ?>
145  </td>
146  <td class="col-discount">
147  <?php if ($block->canShowPriceInfo($_item)): ?>
148  <?= /* @escapeNotVerified */ $block->displayPriceAttribute('discount_amount') ?>
149  <?php else: ?>
150  &nbsp;
151  <?php endif; ?>
152  </td>
153  <td class="col-total last">
154  <?php if ($block->canShowPriceInfo($_item)): ?>
155  <?= $block->getColumnHtml($_item, 'total') ?>
156  <?php else: ?>
157  &nbsp;
158  <?php endif; ?>
159  </td>
160  </tr>
161 <?php endforeach; ?>
162 <?php if ($_showlastRow): ?>
163  <tr class="border">
164  <td class="col-product">
165  <?php if ($block->getOrderOptions($_item->getOrderItem())): ?>
166  <dl class="item-options">
167  <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option): ?>
168  <dt><?= /* @escapeNotVerified */ $option['label'] ?></dt>
169  <dd>
170  <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
171  <?= /* @escapeNotVerified */ $option['value'] ?>
172  <?php else: ?>
173  <?= $block->truncateString($option['value'], 55, '', $_remainder) ?>
174  <?php if ($_remainder):?>
175  ... <span id="<?= /* @escapeNotVerified */ $_id = 'id' . uniqid() ?>"><?= /* @escapeNotVerified */ $_remainder ?></span>
176  <script>
177 require(['prototype'], function(){
178 
179  $('<?= /* @escapeNotVerified */ $_id ?>').hide();
180  $('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseover', function(){$('<?= /* @escapeNotVerified */ $_id ?>').show();});
181  $('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseout', function(){$('<?= /* @escapeNotVerified */ $_id ?>').hide();});
182 
183 });
184 </script>
185  <?php endif;?>
186  <?php endif;?>
187  </dd>
188  <?php endforeach; ?>
189  </dl>
190  <?php else: ?>
192  <?php endif; ?>
193  <?= $block->escapeHtml($_item->getDescription()) ?>
194  </td>
195  <td>&nbsp;</td>
196  <td>&nbsp;</td>
197  <td>&nbsp;</td>
198  <td>&nbsp;</td>
199  <td>&nbsp;</td>
200  <td>&nbsp;</td>
201  <td class="last">&nbsp;</td>
202  </tr>
203 <?php endif; ?>
</td ></tr > $_prevOptionId endif
Definition: renderer.phtml:46
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
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