init
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @var $block \Magento\Sales\Block\Adminhtml\Items\Column\Name
|
||||
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Magento\Catalog\Helper\Data $catalogHelper */
|
||||
$catalogHelper = $block->getData('catalogHelper');
|
||||
|
||||
?>
|
||||
<?php
|
||||
if ($_item = $block->getItem()):
|
||||
|
||||
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
|
||||
$_product = $objectManager->create('Magento\Catalog\Model\Product')->load($_item->getProductId());
|
||||
?>
|
||||
<div id="order_item_<?= (int) $_item->getId() ?>_title"
|
||||
class="product-title">
|
||||
<?= $block->escapeHtml($_item->getName()) ?>
|
||||
</div>
|
||||
<div class="product-sku-block">
|
||||
<span><?= $block->escapeHtml(__('SKU'))?>:</span>
|
||||
<?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($block->escapeHtml($block->getSku()))) ?>
|
||||
</div>
|
||||
|
||||
<?php if ($block->getOrderOptions()): ?>
|
||||
<dl class="item-options">
|
||||
<?php foreach ($block->getOrderOptions() as $_option): ?>
|
||||
<dt><?= $block->escapeHtml($_option['label']) ?>:</dt>
|
||||
<dd>
|
||||
<?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
|
||||
<?= /* @noEscape */ $block->getCustomizedOptionValue($_option) ?>
|
||||
<?php else: ?>
|
||||
<?php $_option = $block->getFormattedOption($_option['value']); ?>
|
||||
<?php $dots = 'dots' . uniqid(); ?>
|
||||
<?php $id = 'id' . uniqid(); ?>
|
||||
<?= $block->escapeHtml($_option['value'], ['a', 'br']) ?>
|
||||
<?php if (isset($_option['remainder']) && $_option['remainder']): ?>
|
||||
<span id="<?= /* @noEscape */ $dots; ?>"> ...</span>
|
||||
<span id="<?= /* @noEscape */ $id; ?>">
|
||||
<?= $block->escapeHtml($_option['remainder'], ['a']) ?>
|
||||
</span>
|
||||
<?php $scriptString = <<<script
|
||||
require(['prototype'], function() {
|
||||
|
||||
script;
|
||||
$scriptString .= "$('" . /* @noEscape */ $id . "').hide();" . PHP_EOL;
|
||||
$scriptString .= "$('" . /* @noEscape */ $id .
|
||||
"').up().observe('mouseover', function(){ $('" . /* @noEscape */ $id . "').show();});" .
|
||||
PHP_EOL;
|
||||
$scriptString .= "$('" . /* @noEscape */ $id .
|
||||
"').up().observe('mouseover', function(){ $('" . /* @noEscape */ $dots .
|
||||
"').hide();});" . PHP_EOL;
|
||||
$scriptString .= "$('" . /* @noEscape */ $id .
|
||||
"').up().observe('mouseout', function(){ $('" . /* @noEscape */ $id .
|
||||
"').hide();});" . PHP_EOL;
|
||||
$scriptString .= "$('" . /* @noEscape */ $id .
|
||||
"').up().observe('mouseout', function(){ $('" . /* @noEscape */ $dots .
|
||||
"').show();});" . PHP_EOL . "});" . PHP_EOL;
|
||||
?>
|
||||
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
<?= $block->escapeHtml($_item->getDescription()) ?>
|
||||
|
||||
<?php if($_product->getData('included')):?>
|
||||
<dl class="item-options summary-detail">
|
||||
<dt>组合包含</dt>
|
||||
<dd><?= $_product->getData('included')?></dd>
|
||||
</dl>
|
||||
<style>
|
||||
.item-options.summary-detail ul{padding-left: 12px;margin-bottom: 10px;font-size: 12px;}
|
||||
.item-options.summary-detail ul li{list-style: disc outside;margin-bottom: 0;}
|
||||
.item-options.summary-detail ul ul{margin-top: 5px;}
|
||||
.item-options.summary-detail ul ul li{list-style: circle outside;}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user