init
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<style>
|
||||
.sales-order-index .data-grid-actions-cell a{text-wrap: nowrap}
|
||||
</style>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?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()): ?>
|
||||
<div id="order_item_<?= (int) $_item->getId() ?>_title"
|
||||
class="product-title">
|
||||
<?= $block->escapeHtml($_item->getProductOptionByCode('simple_name')?? $_item->getName()) ?>
|
||||
</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 endif; ?>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
?>
|
||||
<?php if ($item = $block->getItem()) : ?>
|
||||
<table class="qty-table">
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><?= (float) $item->getQtyOrdered() ?></td>
|
||||
</tr>
|
||||
|
||||
<?php if ((float)$item->getQtyInvoiced()) : ?>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><?= (float) $item->getQtyInvoiced() ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ((float)$item->getQtyShipped()) : ?>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><?= (float) $item->getQtyShipped() ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ((float)$item->getQtyRefunded()) : ?>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><?= (float) $item->getQtyRefunded() ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ((float)$item->getQtyCanceled()) : ?>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><?= (float) $item->getQtyCanceled() ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
/** @var \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $block */
|
||||
$_item = $block->getItem();
|
||||
?>
|
||||
<div class="price-excl-tax">
|
||||
<?= /* @noEscape */ $block->displayPrices($_item->getBaseRowTotal(), $_item->getRowTotal()) ?>
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
/** @var \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $block */
|
||||
$_item = $block->getItem();
|
||||
?>
|
||||
<?= /* @noEscape */ $block->displayPrices($block->getBaseTotalAmount($_item), $block->getTotalAmount($_item)) ?>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
/** @var \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $block */
|
||||
$_item = $block->getItem();
|
||||
?>
|
||||
<div class="price-excl-tax">
|
||||
<?= /* @noEscape */ $block->displayPrices($_item->getBasePrice(), $_item->getPrice()) ?>
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
?>
|
||||
<?= $block->escapeHtml($block->getItem()->getName()) ?>
|
||||
<div><strong><?= $block->escapeHtml(__('SKU')) ?>:</strong> <?= /* @noEscape */ implode('<br />', $this->helper(\Magento\Catalog\Helper\Data::class)->splitSku($block->escapeHtml($block->getItem()->getSku()))) ?></div>
|
||||
<?php if ($block->getOrderOptions()) : ?>
|
||||
<ul class="item-options">
|
||||
<?php foreach ($block->getOrderOptions() as $option) : ?>
|
||||
<li><strong><?= $block->escapeHtml($option['label']) ?>:</strong><br />
|
||||
<?php if (is_array($option['value'])) : ?>
|
||||
<?php foreach ($option['value'] as $item) : ?>
|
||||
<?= $block->getValueHtml($item) ?><br />
|
||||
<?php endforeach; ?>
|
||||
<?php else : ?>
|
||||
<?= $block->escapeHtml($option['value']) ?>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?= $block->escapeHtml($block->getItem()->getDescription()) ?>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/* @var $block \Stemcell\Sales\Block\Adminhtml\Order\Reject */
|
||||
$order = $block->getOrder();
|
||||
$rejectUrl = $block->getRejectUrl();
|
||||
?>
|
||||
<?php if ($block->canReject()): ?>
|
||||
<button id="order-reject-button"
|
||||
class="action-default scalable"
|
||||
type="button">
|
||||
驳回
|
||||
</button>
|
||||
|
||||
<div id="reject-modal" style="display:none;">
|
||||
<form id="reject-form" method="post" action="<?php echo $rejectUrl; ?>">
|
||||
<input type="hidden" name="form_key" value="<?php echo $block->getFormKey(); ?>"/>
|
||||
<input type="hidden" name="order_id" value="<?php echo $order->getId(); ?>"/>
|
||||
|
||||
<label for="reason">Reject Reason</label>
|
||||
<textarea name="reason" id="reason" style="width:100%; height:150px;"></textarea>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
require(['jquery', 'Magento_Ui/js/modal/modal'], function ($, modal) {
|
||||
|
||||
var options = {
|
||||
type: 'popup',
|
||||
title: 'Reject Order',
|
||||
responsive: true,
|
||||
buttons: [{
|
||||
text: 'Submit',
|
||||
class: 'action-primary',
|
||||
click: function () {
|
||||
$('#reject-form').submit();
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
var popup = modal(options, $('#reject-modal'));
|
||||
|
||||
$('#order-reject-button').on('click', function () {
|
||||
$('#reject-modal').modal('openModal');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Sales\Block\Adminhtml\Order\View\History $block */
|
||||
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
|
||||
?>
|
||||
<div id="order_history_block" class="edit-order-comments">
|
||||
<?php if (0 && $block->canAddComment()): ?>
|
||||
<div class="order-history-block" id="history_form">
|
||||
|
||||
<div class="admin__field">
|
||||
<label for="history_status" class="admin__field-label"><?= $block->escapeHtml(__('Status')) ?></label>
|
||||
<div class="admin__field-control">
|
||||
<select name="history[status]" id="history_status" class="admin__control-select">
|
||||
<?php foreach ($block->getStatuses() as $_code => $_label): ?>
|
||||
<option value="<?= $block->escapeHtmlAttr($_code) ?>"
|
||||
<?php if ($_code == $block->getOrder()->getStatus()): ?> selected="selected"
|
||||
<?php endif; ?>>
|
||||
<?= $block->escapeHtml($_label) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin__field">
|
||||
<label for="history_comment" class="admin__field-label">
|
||||
<?= $block->escapeHtml(__('Comment')) ?>
|
||||
</label>
|
||||
<div class="admin__field-control">
|
||||
<textarea name="history[comment]"
|
||||
rows="3"
|
||||
cols="5"
|
||||
id="history_comment"
|
||||
class="admin__control-textarea"></textarea>
|
||||
<div class="admin__field-note">
|
||||
<span>
|
||||
<?= $block->escapeHtml(
|
||||
__('A status change or comment text is required to submit a comment.')
|
||||
)?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin__field">
|
||||
<div class="order-history-comments-options">
|
||||
<div class="admin__field admin__field-option">
|
||||
<?php if ($block->canSendCommentEmail()): ?>
|
||||
<input name="history[is_customer_notified]"
|
||||
type="checkbox"
|
||||
id="history_notify"
|
||||
class="admin__control-checkbox"
|
||||
value="1" />
|
||||
<label class="admin__field-label" for="history_notify">
|
||||
<?= $block->escapeHtml(__('Notify Customer by Email')) ?>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="admin__field admin__field-option">
|
||||
<input name="history[is_visible_on_front]"
|
||||
type="checkbox"
|
||||
id="history_visible"
|
||||
class="admin__control-checkbox"
|
||||
value="1" />
|
||||
<label class="admin__field-label" for="history_visible">
|
||||
<?= $block->escapeHtml(__('Visible on Storefront')) ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="order-history-comments-actions">
|
||||
<?= $block->getChildHtml('submit_button') ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<ul class="note-list">
|
||||
<?php foreach ($block->getOrder()->getStatusHistoryCollection(true) as $_item): ?>
|
||||
<li class="note-list-item">
|
||||
<span class="note-list-date">
|
||||
<?= /* @noEscape */ $block->formatDate($_item->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?>
|
||||
</span>
|
||||
<span class="note-list-time">
|
||||
<?= /* @noEscape */ $block->formatTime($_item->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?>
|
||||
</span>
|
||||
<span class="note-list-status"><?= $block->escapeHtml($_item->getStatusLabel()) ?></span>
|
||||
<span class="note-list-customer">
|
||||
<?= $block->escapeHtml(__('Customer')) ?>
|
||||
<?php if ($block->isCustomerNotificationNotApplicable($_item)): ?>
|
||||
<span class="note-list-customer-notapplicable">
|
||||
<?= $block->escapeHtml(__('Notification Not Applicable')) ?>
|
||||
</span>
|
||||
<?php elseif ($_item->getIsCustomerNotified()): ?>
|
||||
<span class="note-list-customer-notified"><?= $block->escapeHtml(__('Notified')) ?></span>
|
||||
<?php else: ?>
|
||||
<span class="note-list-customer-not-notified"><?= $block->escapeHtml(__('Not Notified')) ?></span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<?php if ($_item->getComment()): ?>
|
||||
<div class="note-list-comment">
|
||||
<?= $block->escapeHtml($_item->getComment(), ['b', 'br', 'strong', 'i', 'u', 'a']) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php $scriptString = <<<script
|
||||
require(['prototype'], function(){
|
||||
if($('order_status'))$('order_status').update('{$block->escapeJs($block->getOrder()->getStatusLabel())}');
|
||||
});
|
||||
script;
|
||||
?>
|
||||
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
|
||||
</div>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var \Magento\Sales\Block\Adminhtml\Order\View\Info $block
|
||||
*/
|
||||
$order = $block->getOrder();
|
||||
|
||||
$baseCurrencyCode = (string)$order->getBaseCurrencyCode();
|
||||
$globalCurrencyCode = (string)$order->getGlobalCurrencyCode();
|
||||
$orderCurrencyCode = (string)$order->getOrderCurrencyCode();
|
||||
|
||||
$orderAdminDate = $block->formatDate(
|
||||
$block->getOrderAdminDate($order->getCreatedAt()),
|
||||
\IntlDateFormatter::MEDIUM,
|
||||
true
|
||||
);
|
||||
|
||||
$orderStoreDate = $block->formatDate(
|
||||
$order->getCreatedAt(),
|
||||
\IntlDateFormatter::MEDIUM,
|
||||
true,
|
||||
$block->getTimezoneForStore($order->getStore())
|
||||
);
|
||||
|
||||
$customerUrl = $block->getCustomerViewUrl();
|
||||
|
||||
$allowedAddressHtmlTags = ['b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul'];
|
||||
?>
|
||||
|
||||
<section class="admin__page-section order-view-account-information">
|
||||
<div class="admin__page-section-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Order & Account Information')) ?></span>
|
||||
</div>
|
||||
<div class="admin__page-section-content">
|
||||
<div class="admin__page-section-item order-information">
|
||||
<?php /* Order Information */ ?>
|
||||
<?php $confirmationEmailStatusMessage = $order->getEmailSent() ? __('The order confirmation email was sent') : __('The order confirmation email is not sent'); ?>
|
||||
<div class="admin__page-section-item-title">
|
||||
<span class="title">
|
||||
<?php if ($block->getNoUseOrderLink()) : ?>
|
||||
<?= $block->escapeHtml(__('Order # %1', $order->getRealOrderId())) ?> (<span><?= $block->escapeHtml($confirmationEmailStatusMessage) ?></span>)
|
||||
<?php else : ?>
|
||||
<a href="<?= $block->escapeUrl($block->getViewUrl($order->getId())) ?>"><?= $block->escapeHtml(__('Order # %1', $order->getRealOrderId())) ?></a>
|
||||
<span>(<?= $block->escapeHtml($confirmationEmailStatusMessage) ?>)</span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="admin__page-section-item-content">
|
||||
<table class="admin__table-secondary order-information-table">
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Order Date')) ?></th>
|
||||
<td><?= $block->escapeHtml($orderAdminDate) ?></td>
|
||||
</tr>
|
||||
<?php if ($orderAdminDate != $orderStoreDate) : ?>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Order Date (%1)', $block->getTimezoneForStore($order->getStore()))) ?></th>
|
||||
<td><?= $block->escapeHtml($orderStoreDate) ?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Order Status')) ?></th>
|
||||
<td><span id="order_status"><?= $block->escapeHtml($order->getStatusLabel()) ?></span></td>
|
||||
</tr>
|
||||
<?= $block->getChildHtml() ?>
|
||||
<!-- --><?php //if ($block->isSingleStoreMode() == false) : ?>
|
||||
<!-- <tr>-->
|
||||
<!-- <th>--><?php //= $block->escapeHtml(__('Purchased From')) ?><!--</th>-->
|
||||
<!-- <td>--><?php //= $block->escapeHtml($block->getOrderStoreName(), ['br']) ?><!--</td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- --><?php //endif; ?>
|
||||
<?php if ($order->getRelationChildId()) : ?>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Link to the New Order')) ?></th>
|
||||
<td>
|
||||
<a href="<?= $block->escapeUrl($block->getViewUrl($order->getRelationChildId())) ?>">
|
||||
<?= $block->escapeHtml($order->getRelationChildRealId()) ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ($order->getRelationParentId()) : ?>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Link to the Previous Order')) ?></th>
|
||||
<td>
|
||||
<a href="<?= $block->escapeUrl($block->getViewUrl($order->getRelationParentId())) ?>">
|
||||
<?= $block->escapeHtml($order->getRelationParentRealId()) ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<!-- --><?php //if ($order->getRemoteIp() && $block->shouldDisplayCustomerIp()) : ?>
|
||||
<!-- <tr>-->
|
||||
<!-- <th>--><?php //= $block->escapeHtml(__('Placed from IP')) ?><!--</th>-->
|
||||
<!-- <td>--><?php //= $block->escapeHtml($order->getRemoteIp()); ?><!----><?php //= $order->getXForwardedFor() ? ' (' . $block->escapeHtml($order->getXForwardedFor()) . ')' : ''; ?><!--</td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- --><?php //endif; ?>
|
||||
<?php if ($globalCurrencyCode !== $baseCurrencyCode) : ?>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('%1 / %2 rate:', $globalCurrencyCode, $baseCurrencyCode)) ?></th>
|
||||
<td><?= $block->escapeHtml($order->getBaseToGlobalRate()) ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ($baseCurrencyCode !== $orderCurrencyCode && $globalCurrencyCode !== $orderCurrencyCode) : ?>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('%1 / %2 rate:', $orderCurrencyCode, $baseCurrencyCode)) ?></th>
|
||||
<td><?= $block->escapeHtml($order->getBaseToOrderRate()) ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin__page-section-item order-account-information">
|
||||
<?php /* Account Information */ ?>
|
||||
<div class="admin__page-section-item-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Account Information')) ?></span>
|
||||
<div class="actions">
|
||||
<?php if ($customerUrl) : ?>
|
||||
<a href="<?= /* @noEscape */ $customerUrl ?>" target="_blank">
|
||||
<?= $block->escapeHtml(__('Edit Customer')) ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin__page-section-item-content">
|
||||
<table class="admin__table-secondary order-account-information-table">
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Customer Name')) ?></th>
|
||||
<td>
|
||||
<?php if ($customerUrl) : ?>
|
||||
<a href="<?= $block->escapeUrl($customerUrl) ?>" target="_blank">
|
||||
<span><?= $block->escapeHtml($order->getCustomerName()) ?></span>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?= $block->escapeHtml($order->getCustomerName()) ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Email')) ?></th>
|
||||
<td><a href="mailto:<?= $block->escapeHtmlAttr($order->getCustomerEmail()) ?>"><?= $block->escapeHtml($order->getCustomerEmail()) ?></a></td>
|
||||
</tr>
|
||||
<?php if ($groupName = $block->getCustomerGroupName()) : ?>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Customer Group')) ?></th>
|
||||
<td><?= $block->escapeHtml($groupName) ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($block->getCustomerAccountData() as $data) : ?>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml($data['label']) ?></th>
|
||||
<td><?= $block->escapeHtml($data['value'], ['br']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?= $block->getChildHtml('extra_customer_info') ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="admin__page-section order-addresses">
|
||||
<div class="admin__page-section-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Address Information')) ?></span>
|
||||
</div>
|
||||
<div class="admin__page-section-content">
|
||||
<div class="admin__page-section-item order-billing-address">
|
||||
<?php /* Billing Address */ ?>
|
||||
<div class="admin__page-section-item-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Billing Address')) ?></span>
|
||||
<div class="actions"><?= /* @noEscape */ $block->getAddressEditLink($order->getBillingAddress()); ?></div>
|
||||
</div>
|
||||
<address class="admin__page-section-item-content"><?= $block->escapeHtml($block->getFormattedAddress($order->getBillingAddress()), $allowedAddressHtmlTags); ?></address>
|
||||
</div>
|
||||
<?php if (!$block->getOrder()->getIsVirtual()) : ?>
|
||||
<div class="admin__page-section-item order-shipping-address">
|
||||
<?php /* Shipping Address */ ?>
|
||||
<div class="admin__page-section-item-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Shipping Address')) ?></span>
|
||||
<div class="actions"><?= /* @noEscape */ $block->getAddressEditLink($order->getShippingAddress()); ?></div>
|
||||
</div>
|
||||
<address class="admin__page-section-item-content"><?= $block->escapeHtml($block->getFormattedAddress($order->getShippingAddress()), $allowedAddressHtmlTags); ?></address>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var \Magento\Sales\Block\Adminhtml\Order\View\Items $block
|
||||
*/
|
||||
|
||||
$_order = $block->getOrder() ?>
|
||||
<div class="admin__table-wrapper">
|
||||
<table class="data-table admin__table-primary edit-order-table">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
<?php $i = 0;
|
||||
$columns = $block->getColumns();
|
||||
$lastItemNumber = count($columns) ?>
|
||||
<?php foreach ($columns as $columnName => $columnTitle) : ?>
|
||||
<?php $i++; ?>
|
||||
<th class="col-<?= $block->escapeHtmlAttr($columnName) ?><?= /* @noEscape */ ($i === $lastItemNumber ? ' last' : '') ?>"><span><?= $block->escapeHtml($columnTitle) ?></span></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $_items = $block->getItemsCollection();?>
|
||||
<?php $i = 0; foreach ($_items as $_item) : ?>
|
||||
<?php if ($_item->getParentItem()) :
|
||||
continue;
|
||||
else :
|
||||
$i++;
|
||||
endif; ?>
|
||||
<tbody class="<?= /* @noEscape */ $i%2 ? 'even' : 'odd' ?>">
|
||||
<?= $block->getItemHtml($_item) ?>
|
||||
<?= $block->getItemExtraInfoHtml($_item) ?>
|
||||
</tbody>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="reject-order-modal" style="display:none;">
|
||||
<form id="reject_order_form"
|
||||
method="post"
|
||||
action="<?= $block->getUrl('stemcell_sales/order/reject') ?>"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
<?= $block->getBlockHtml('formkey'); ?>
|
||||
|
||||
<label>原因:</label>
|
||||
<textarea name="reason" id="reject_reason" style="width:100%;height:120px;"></textarea>
|
||||
|
||||
<input type="hidden" name="order_id" value="<?= $block->getOrder()->getId(); ?>" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
require([
|
||||
'jquery',
|
||||
'Magento_Ui/js/modal/modal'
|
||||
], function ($, modal) {
|
||||
|
||||
window.orderReject = function () {
|
||||
|
||||
var modalEl = $('#reject-order-modal');
|
||||
|
||||
var options = {
|
||||
type: 'popup',
|
||||
title: '订单驳回',
|
||||
modalClass: 'reject-order-popup',
|
||||
buttons: [
|
||||
{
|
||||
text: 'Submit',
|
||||
class: 'action-primary',
|
||||
click: function () {
|
||||
var reason = $('#reject_reason').val();
|
||||
if (!reason) {
|
||||
alert('请填写驳回的原因');
|
||||
return;
|
||||
}
|
||||
|
||||
$("#reject_order_form").submit();
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
modal(options, modalEl);
|
||||
modalEl.modal('openModal');
|
||||
};
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var $block \Magento\Sales\Block\Adminhtml\Order\View\Tab\Info */
|
||||
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
|
||||
?>
|
||||
<?php $_order = $block->getOrder() ?>
|
||||
|
||||
<div id="order-messages">
|
||||
<?= $block->getChildHtml('order_messages') ?>
|
||||
</div>
|
||||
|
||||
<?= $block->getChildHtml('order_info') ?>
|
||||
<input type="hidden" name="order_id" value="<?= (int) $_order->getId() ?>"/>
|
||||
|
||||
<section class="admin__page-section order-view-billing-shipping">
|
||||
<div class="admin__page-section-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Payment & Shipping Method')) ?></span>
|
||||
</div>
|
||||
<div class="admin__page-section-content">
|
||||
<div class="admin__page-section-item order-payment-method<?= ($_order->getIsVirtual() ?
|
||||
' order-payment-method-virtual' : '') ?>">
|
||||
<?php /* Payment Method */ ?>
|
||||
<div class="admin__page-section-item-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Payment Information')) ?></span>
|
||||
</div>
|
||||
<div class="admin__page-section-item-content">
|
||||
<div class="order-payment-method-title"><?= $block->getPaymentHtml() ?></div>
|
||||
<div class="order-payment-currency">
|
||||
<?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?>
|
||||
</div>
|
||||
<div class="order-payment-additional">
|
||||
<?= $block->getChildHtml('order_payment_additional') ?>
|
||||
<?= $block->getChildHtml('payment_additional_info') ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?= $block->getChildHtml('order_shipping_view') ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?= $block->getChildHtml('order_additional_info') ?>
|
||||
|
||||
<?= $block->getGiftOptionsHtml() ?>
|
||||
|
||||
<section class="admin__page-section">
|
||||
<div class="admin__page-section-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Items Ordered')) ?></span>
|
||||
</div>
|
||||
<?= $block->getItemsHtml() ?>
|
||||
</section>
|
||||
|
||||
<section class="admin__page-section">
|
||||
<div class="admin__page-section-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Order Total')) ?></span>
|
||||
</div>
|
||||
<div class="admin__page-section-content" style="display: flex; gap: 30px">
|
||||
|
||||
<div class="admin__page-section-item order-totals" style="float: none">
|
||||
<div class="admin__page-section-item-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Order Totals')) ?></span>
|
||||
</div>
|
||||
<?= $block->getChildHtml('order_totals') ?>
|
||||
</div>
|
||||
<div class="admin__page-section-item order-comments-history" style="float: none">
|
||||
<div class="admin__page-section-item-title">
|
||||
<span class="title"><?= $block->escapeHtml(__('Notes for this Order')) ?></span>
|
||||
</div>
|
||||
<?= $block->getChildHtml('order_history') ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?= $block->getChildHtml('popup_window') ?>
|
||||
<style>
|
||||
.page-columns .side-col {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.page-layout-admin-2columns-left .page-columns .main-col {
|
||||
width: 100%;
|
||||
float: none;
|
||||
}
|
||||
.page-layout-admin-2columns-left .page-columns {
|
||||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<?php $scriptString = <<<script
|
||||
require([
|
||||
"prototype",
|
||||
"Magento_Sales/order/giftoptions_tooltip"
|
||||
], function(){
|
||||
|
||||
//<![CDATA[
|
||||
/**
|
||||
* Retrieve gift options tooltip content
|
||||
*/
|
||||
function getGiftOptionsTooltipContent(itemId) {
|
||||
var contentLines = [];
|
||||
var headerLine = null;
|
||||
var contentLine = null;
|
||||
|
||||
\$$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element) {
|
||||
if (element.down(0)) {
|
||||
headerLine = element.down(0).innerHTML;
|
||||
contentLine = element.down(0).next().innerHTML;
|
||||
if (contentLine.length > 30) {
|
||||
contentLine = contentLine.slice(0,30) + '...';
|
||||
}
|
||||
contentLines.push(headerLine + ' ' + contentLine);
|
||||
}
|
||||
});
|
||||
return contentLines.join('<br/>');
|
||||
}
|
||||
giftOptionsTooltip.setTooltipContentLoaderFunction(getGiftOptionsTooltipContent);
|
||||
window.getGiftOptionsTooltipContent = getGiftOptionsTooltipContent;
|
||||
//]]>
|
||||
|
||||
});
|
||||
script;
|
||||
?>
|
||||
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
|
||||
Reference in New Issue
Block a user