name.phtml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. // @codingStandardsIgnoreFile
  7. ?>
  8. <?php
  9. /**
  10. * @see \Magento\Sales\Block\Adminhtml\Items\Column\Name
  11. */
  12. ?>
  13. <?php if ($_item = $block->getItem()): ?>
  14. <div id="order_item_<?= $block->escapeHtml($_item->getId()) ?>_title"
  15. class="product-title">
  16. <?= $block->escapeHtml($_item->getName()) ?>
  17. </div>
  18. <div class="product-sku-block">
  19. <span><?= $block->escapeHtml(__('SKU'))?>:</span> <?= implode('<br />', $this->helper('Magento\Catalog\Helper\Data')->splitSku($block->escapeHtml($block->getSku()))) ?>
  20. </div>
  21. <?php if ($block->getOrderOptions()): ?>
  22. <dl class="item-options">
  23. <?php foreach ($block->getOrderOptions() as $_option): ?>
  24. <dt><?= $block->escapeHtml($_option['label']) ?>:</dt>
  25. <dd>
  26. <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
  27. <?= /* @escapeNotVerified */ $block->getCustomizedOptionValue($_option) ?>
  28. <?php else: ?>
  29. <?php $_option = $block->getFormattedOption($_option['value']); ?>
  30. <?php $dots = 'dots' . uniqid(); ?>
  31. <?= $block->escapeHtml($_option['value']) ?><?php if (isset($_option['remainder']) && $_option['remainder']): ?> <span id="<?= /* @noEscape */ $dots; ?>"> ...</span>
  32. <?php $id = 'id' . uniqid(); ?>
  33. <span id="<?= /* @noEscape */ $id; ?>"><?= $block->escapeHtml($_option['remainder']) ?></span>
  34. <script>
  35. require(['prototype'], function() {
  36. $('<?= /* @noEscape */ $id; ?>').hide();
  37. $('<?= /* @noEscape */ $id; ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $id; ?>').show();});
  38. $('<?= /* @noEscape */ $id; ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $dots; ?>').hide();});
  39. $('<?= /* @noEscape */ $id; ?>').up().observe('mouseout', function(){$('<?= /* @noEscape */ $id; ?>').hide();});
  40. $('<?= /* @noEscape */ $id; ?>').up().observe('mouseout', function(){$('<?= /* @noEscape */ $dots; ?>').show();});
  41. });
  42. </script>
  43. <?php endif; ?>
  44. <?php endif; ?>
  45. </dd>
  46. <?php endforeach; ?>
  47. </dl>
  48. <?php endif; ?>
  49. <?= $block->escapeHtml($_item->getDescription()) ?>
  50. <?php endif; ?>