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 
11 <?php ?>
12 
13 <?php $_item = $block->getItem() ?>
14 <?php $items = $block->getChildren($_item); ?>
15 <?php $_count = count($items) ?>
16 <?php $_index = 0 ?>
17 
18 <?php $_prevOptionId = '' ?>
19 
20 <?php if ($block->getOrderOptions() || $_item->getDescription()): ?>
21  <?php $_showlastRow = true ?>
22 <?php else: ?>
23  <?php $_showlastRow = false ?>
24 <?php endif; ?>
25 
26 <?php foreach ($items as $_item): ?>
27  <?php $block->setPriceDataObject($_item) ?>
28  <?php if ($_item->getOrderItem()->getParentItem()): ?>
29  <?php $attributes = $block->getSelectionAttributes($_item) ?>
30  <?php if ($_prevOptionId != $attributes['option_id']): ?>
31  <tr>
32  <td class="col-product"><div class="option-label"><?= /* @escapeNotVerified */ $attributes['option_label'] ?></div></td>
33  <td class="col-product">&nbsp;</td>
34  <td class="col-qty last">&nbsp;</td>
35  </tr>
36  <?php $_prevOptionId = $attributes['option_id'] ?>
37  <?php endif; ?>
38  <?php endif; ?>
39  <tr class="<?= (++$_index == $_count && !$_showlastRow) ? 'border' : '' ?>">
40  <?php if (!$_item->getOrderItem()->getParentItem()): ?>
41  <td class="col-product">
42  <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
43  <div class="product-sku-block">
44  <span><?= /* @escapeNotVerified */ __('SKU') ?>:</span>
45  <?= implode('<br />', $this->helper('Magento\Catalog\Helper\Data')->splitSku($block->escapeHtml($_item->getSku()))) ?>
46  </div>
47  </td>
48  <?php else: ?>
49  <td class="col-product"><div class="option-value"><?= $block->getValueHtml($_item) ?></div></td>
50  <?php endif; ?>
51  <td class="col-ordered-qty">
52  <?php if ($block->isShipmentSeparately($_item)): ?>
53  <?= $block->getColumnHtml($_item, 'qty') ?>
54  <?php else: ?>
55  &nbsp;
56  <?php endif; ?>
57  </td>
58  <td class="col-qty last">
59  <?php if ($block->isShipmentSeparately($_item)): ?>
60  <input type="text"
61  class="input-text admin__control-text"
62  name="shipment[items][<?= /* @escapeNotVerified */ $_item->getOrderItemId() ?>]"
63  value="<?= /* @escapeNotVerified */ $_item->getQty()*1 ?>" />
64  <?php else: ?>
65  &nbsp;
66  <?php endif; ?>
67  </td>
68  </tr>
69 <?php endforeach; ?>
70 <?php if ($_showlastRow): ?>
71  <tr class="border">
72  <td class="col-product">
73  <?php if ($block->getOrderOptions($_item->getOrderItem())): ?>
74  <dl class="item-options">
75  <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option): ?>
76  <dt><?= /* @escapeNotVerified */ $option['label'] ?></dt>
77  <dd>
78  <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
79  <?= /* @escapeNotVerified */ $option['value'] ?>
80  <?php else: ?>
81  <?= $block->truncateString($option['value'], 55, '', $_remainder) ?>
82  <?php if ($_remainder):?>
83  ... <span id="<?= /* @escapeNotVerified */ $_id = 'id' . uniqid() ?>"><?= /* @escapeNotVerified */ $_remainder ?></span>
84  <script>
85 require(['prototype'], function(){
86 
87  $('<?= /* @escapeNotVerified */ $_id ?>').hide();
88  $('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseover', function(){$('<?= /* @escapeNotVerified */ $_id ?>').show();});
89  $('<?= /* @escapeNotVerified */ $_id ?>').up().observe('mouseout', function(){$('<?= /* @escapeNotVerified */ $_id ?>').hide();});
90 
91 });
92 </script>
93  <?php endif;?>
94  <?php endif;?>
95  </dd>
96  <?php endforeach; ?>
97  </dl>
98  <?php else: ?>
99  &nbsp;
100  <?php endif; ?>
101  <?= $block->escapeHtml($_item->getDescription()) ?>
102  </td>
103  <td class="col-ordered-qty">&nbsp;</td>
104  <td class="col-qty last">&nbsp;</td>
105  </tr>
106 <?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
$_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