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 class="last">&nbsp;</td>
43  </tr>
44  <?php $_prevOptionId = $attributes['option_id'] ?>
45  <?php endif; ?>
46  <?php endif; ?>
47  <tr<?= (++$_index == $_count && !$_showlastRow) ? ' class="border"' : '' ?>>
48  <?php if (!$_item->getOrderItem()->getParentItem()): ?>
49  <td class="col-product">
50  <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
51  <div class="product-sku-block">
52  <span><?= /* @escapeNotVerified */ __('SKU') ?>:</span>
53  <?= implode('<br />', $this->helper('Magento\Catalog\Helper\Data')->splitSku($block->escapeHtml($_item->getSku()))) ?>
54  </div>
55  </td>
56  <?php else: ?>
57  <td class="col-product"><div class="option-value"><?= $block->getValueHtml($_item) ?></div></td>
58  <?php endif; ?>
59  <td class="col-price">
60  <?php if ($block->canShowPriceInfo($_item)): ?>
61  <?= $block->getColumnHtml($_item, 'price') ?>
62  <?php else: ?>
63  &nbsp;
64  <?php endif; ?>
65  </td>
66  <td class="col-qty">
67  <?php if ($block->canShowPriceInfo($_item)): ?>
68  <?= /* @escapeNotVerified */ $_item->getQty()*1 ?>
69  <?php else: ?>
70  &nbsp;
71  <?php endif; ?>
72  </td>
73  <td class="col-subtotal">
74  <?php if ($block->canShowPriceInfo($_item)): ?>
75  <?= $block->getColumnHtml($_item, 'subtotal') ?>
76  <?php else: ?>
77  &nbsp;
78  <?php endif; ?>
79  </td>
80  <td class="col-tax">
81  <?php if ($block->canShowPriceInfo($_item)): ?>
82  <?= /* @escapeNotVerified */ $block->displayPriceAttribute('tax_amount') ?>
83  <?php else: ?>
84  &nbsp;
85  <?php endif; ?>
86  </td>
87  <td class="col-discount">
88  <?php if ($block->canShowPriceInfo($_item)): ?>
89  <?= /* @escapeNotVerified */ $block->displayPriceAttribute('discount_amount') ?>
90  <?php else: ?>
91  &nbsp;
92  <?php endif; ?>
93  </td>
94  <td class="col-total last">
95  <?php if ($block->canShowPriceInfo($_item)): ?>
96  <?= $block->getColumnHtml($_item, 'total') ?>
97  <?php else: ?>
98  &nbsp;
99  <?php endif; ?>
100  </td>
101  </tr>
102 <?php endforeach; ?>
103 <?php if ($_showlastRow): ?>
104  <tr class="border">
105  <td class="col-product">
106  <?php if ($block->getOrderOptions()): ?>
107  <dl class="item-options">
108  <?php foreach ($block->getOrderOptions() as $option): ?>
109  <dt><?= /* @escapeNotVerified */ $option['label'] ?></dt>
110  <dd>
111  <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
112  <?= /* @escapeNotVerified */ $option['value'] ?>
113  <?php else: ?>
114  <?= $block->truncateString($option['value'], 55, '', $_remainder) ?>
115  <?php if ($_remainder):?>
116  ... <span id="<?= /* @escapeNotVerified */ $_id = 'id' . uniqid() ?>"><?= /* @escapeNotVerified */ $_remainder ?></span>
117  <script>
118 require(['prototype'], function(){
119 
120  $('<?= /* @escapeNotVerified */ $_id ?>').hide();
121  $('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseover', function(){$('<?= /* @escapeNotVerified */ $_id ?>').show();});
122  $('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseout', function(){$('<?= /* @escapeNotVerified */ $_id ?>').hide();});
123 
124 });
125 </script>
126  <?php endif;?>
127  <?php endif;?>
128  </dd>
129  <?php endforeach; ?>
130  </dl>
131  <?php endif; ?>
132  <?= $block->escapeHtml($block->getItem()->getDescription()) ?>
133  </td>
134  <td>&nbsp;</td>
135  <td>&nbsp;</td>
136  <td>&nbsp;</td>
137  <td>&nbsp;</td>
138  <td>&nbsp;</td>
139  <td class="last">&nbsp;</td>
140  </tr>
141 <?php endif; ?>
</td ></tr > $_prevOptionId endif
Definition: renderer.phtml:46
$_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