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