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