init
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
?>
|
||||
<?php $_creditmemo = $block->getCreditmemo() ?>
|
||||
<?php $_order = $block->getOrder() ?>
|
||||
<?php if ($_creditmemo && $_order) : ?>
|
||||
<table class="email-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="item-info">
|
||||
<?= $block->escapeHtml(__('Items')) ?>
|
||||
</th>
|
||||
<th class="item-qty">
|
||||
<?= $block->escapeHtml(__('Qty')) ?>
|
||||
</th>
|
||||
<th class="item-subtotal">
|
||||
<?= $block->escapeHtml(__('Subtotal')) ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach ($_creditmemo->getAllItems() as $_item) : ?>
|
||||
<?php if (!$_item->getOrderItem()->getParentItem()) : ?>
|
||||
<tbody>
|
||||
<?= $block->getItemHtml($_item) ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<tfoot class="order-totals">
|
||||
<?= $block->getChildHtml('creditmemo_totals') ?>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Sales\Block\Order\Email\Invoice\Items $block */
|
||||
/** @var \Magento\Framework\Escaper $escaper */
|
||||
|
||||
?>
|
||||
<?php $_invoice = $block->getInvoice() ?>
|
||||
<?php $_order = $block->getOrder() ?>
|
||||
<?php if ($_invoice && $_order): ?>
|
||||
<table class="email-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="item-info">
|
||||
<?= $escaper->escapeHtml(__('Items')) ?>
|
||||
</th>
|
||||
<th class="item-qty">
|
||||
<?= $escaper->escapeHtml(__('Qty')) ?>
|
||||
</th>
|
||||
<th class="item-subtotal">
|
||||
<?= $escaper->escapeHtml(__('Subtotal')) ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach ($_invoice->getAllItems() as $_item): ?>
|
||||
<?php if (!$_item->getOrderItem()->getParentItem()): ?>
|
||||
<tbody>
|
||||
<?= $block->getItemHtml($_item) ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<tfoot class="order-totals">
|
||||
<?= $block->getChildHtml('invoice_totals') ?>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
|
||||
/** @var $block \Stemcell\Sales\Block\Order\Email\Items */
|
||||
?>
|
||||
<?php $_order = $block->getOrder() ?>
|
||||
<?php if ($_order) : ?>
|
||||
<?php $_items = $_order->getAllItems(); ?>
|
||||
<table class="email-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="item-info">
|
||||
产品号
|
||||
</th>
|
||||
<th class="item-qty">
|
||||
商品名称
|
||||
</th>
|
||||
<th class="item-price">
|
||||
数量
|
||||
</th>
|
||||
<th class="item-price">
|
||||
经销商价格
|
||||
</th>
|
||||
<th class="item-price">
|
||||
折扣
|
||||
</th>
|
||||
<th class="item-price">
|
||||
总金额
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach ($_items as $_item) : ?>
|
||||
<?php if (!$_item->getParentItem()) : ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?= $_item->getSku() ?></td>
|
||||
<td><?= $_item->getName() ?></td>
|
||||
<td><?= $_item->getQtyOrdered() ?></td>
|
||||
<td>¥<?= $block->getPrice($_item) ?></td>
|
||||
<td><?= number_format($_item->getCustomerDiscountPercent(), 2 ) ?>%</td>
|
||||
<td class="row-total">¥<?= number_format($_item->getRowTotal(), 2) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<tfoot class="order-totals">
|
||||
<tr>
|
||||
<td colspan="1" style="text-align: right"><strong>小记: </strong></td>
|
||||
<td colspan="5" style="text-align: left">
|
||||
<strong>
|
||||
¥<?= number_format($_order->getSubtotal(), 2) ?>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right"><strong>共计优惠: </strong></td>
|
||||
<td colspan="4" style="text-align: left">
|
||||
<strong>
|
||||
¥<?= number_format($_order->getData('customer_discount'), 2) ?>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right"><strong>订单金额: </strong></td>
|
||||
<td colspan="4" style="text-align: left">
|
||||
<strong>
|
||||
¥<?= number_format($_order->getGrandTotal(), 2) ?>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Framework\Escaper $escaper */
|
||||
?>
|
||||
<?php $_item = $block->getItem() ?>
|
||||
<?php $_order = $block->getItem()->getOrder(); ?>
|
||||
<tr>
|
||||
<td class="item-info<?= ($block->getItemOptions() ? ' has-extra' : '') ?>">
|
||||
<p class="product-name"><?= $escaper->escapeHtml($_item->getName()) ?></p>
|
||||
<p class="sku"><?= $escaper->escapeHtml(__('SKU')) ?>: <?= $escaper->escapeHtml($block->getSku($_item)) ?></p>
|
||||
<?php if ($block->getItemOptions()): ?>
|
||||
<dl>
|
||||
<?php foreach ($block->getItemOptions() as $option): ?>
|
||||
<dt><strong><em><?= $escaper->escapeHtml($option['label']) ?></em></strong></dt>
|
||||
<dd>
|
||||
<?= /* @noEscape */ nl2br($option['value']) ?>
|
||||
</dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
<?php $addInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
|
||||
<?php if ($addInfoBlock):?>
|
||||
<?= $addInfoBlock->setItem($_item->getOrderItem())->toHtml() ?>
|
||||
<?php endif; ?>
|
||||
<?= $escaper->escapeHtml($_item->getDescription()) ?>
|
||||
</td>
|
||||
<td class="item-qty"><?= (float) $_item->getQty() ?></td>
|
||||
<td class="item-price">
|
||||
<?= /* @noEscape */ $block->getItemPrice($_item) ?>
|
||||
</td>
|
||||
</tr>
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
/** @var \Magento\Framework\Escaper $escaper */
|
||||
?>
|
||||
<?php $_item = $block->getItem() ?>
|
||||
<?php $_order = $block->getItem()->getOrder(); ?>
|
||||
<tr>
|
||||
<td class="item-info<?= ($block->getItemOptions() ? ' has-extra' : '') ?>">
|
||||
<p class="product-name"><?= $escaper->escapeHtml($_item->getName()) ?></p>
|
||||
<p class="sku"><?= $escaper->escapeHtml(__('SKU')) ?>: <?= $escaper->escapeHtml($block->getSku($_item)) ?></p>
|
||||
<?php if ($block->getItemOptions()): ?>
|
||||
<dl>
|
||||
<?php foreach ($block->getItemOptions() as $option): ?>
|
||||
<dt><strong><em><?= $escaper->escapeHtml($option['label']) ?></em></strong></dt>
|
||||
<dd>
|
||||
<?= /* @noEscape */ nl2br($option['value']) ?>
|
||||
</dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
<?php $addInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
|
||||
<?php if ($addInfoBlock): ?>
|
||||
<?= $addInfoBlock->setItem($_item->getOrderItem())->toHtml() ?>
|
||||
<?php endif; ?>
|
||||
<?= $escaper->escapeHtml($_item->getDescription()) ?>
|
||||
</td>
|
||||
<td class="item-qty"><?= (float) $_item->getQty() ?></td>
|
||||
<td class="item-price">
|
||||
<?= /* @noEscape */ $block->getItemPrice($_item->getOrderItem()) ?>
|
||||
</td>
|
||||
</tr>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
// phpcs:disable Magento2.Files.LineLength, Generic.Files.LineLength
|
||||
|
||||
/** @var $block \Magento\Sales\Block\Order\Email\Items\DefaultItems */
|
||||
|
||||
/** @var $_item \Magento\Sales\Model\Order\Item */
|
||||
/** @var \Magento\Framework\Escaper $escaper */
|
||||
$_item = $block->getItem();
|
||||
$_order = $_item->getOrder();
|
||||
?>
|
||||
<tr>
|
||||
<td class="item-info<?= ($block->getItemOptions() ? ' has-extra' : '') ?>">
|
||||
<p class="product-name"><?= $escaper->escapeHtml($_item->getName()) ?></p>
|
||||
<p class="sku"><?= $escaper->escapeHtml(__('SKU')) ?>: <?= $escaper->escapeHtml($block->getSku($_item)) ?></p>
|
||||
<?php if ($block->getItemOptions()): ?>
|
||||
<dl class="item-options">
|
||||
<?php foreach ($block->getItemOptions() as $option): ?>
|
||||
<dt><strong><em><?= $escaper->escapeHtml($option['label']) ?></em></strong></dt>
|
||||
<dd>
|
||||
<?= /* @noEscape */ nl2br($option['value']) ?>
|
||||
</dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
<?php $addInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
|
||||
<?php if ($addInfoBlock):?>
|
||||
<?= $addInfoBlock->setItem($_item)->toHtml() ?>
|
||||
<?php endif; ?>
|
||||
<?= $escaper->escapeHtml($_item->getDescription()) ?>
|
||||
</td>
|
||||
<td class="item-qty"><?= (float) $_item->getQtyOrdered() ?></td>
|
||||
<td class="item-price">
|
||||
<?= /* @noEscape */ $block->getItemPrice($_item) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($_item->getGiftMessageId()
|
||||
&& $_giftMessage = $this->helper(\Magento\GiftMessage\Helper\Message::class)
|
||||
->getGiftMessage($_item->getGiftMessageId())
|
||||
): ?>
|
||||
<tr>
|
||||
<td colspan="3" class="item-extra">
|
||||
<table class="message-gift">
|
||||
<tr>
|
||||
<td>
|
||||
<h3><?= $escaper->escapeHtml(__('Gift Message')) ?></h3>
|
||||
<strong><?= $escaper->escapeHtml(__('From:')) ?></strong> <?= $escaper->escapeHtml($_giftMessage->getSender()) ?>
|
||||
<br /><strong><?= $escaper->escapeHtml(__('To:')) ?></strong> <?= $escaper->escapeHtml($_giftMessage->getRecipient()) ?>
|
||||
<br /><strong><?= $escaper->escapeHtml(__('Message:')) ?></strong>
|
||||
<br /><?= $escaper->escapeHtml($_giftMessage->getMessage()) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
/** @var \Magento\Sales\Block\Order\Email\Items\DefaultItems $block */
|
||||
|
||||
$_item = $block->getItem();
|
||||
|
||||
/** @var \Magento\Sales\Model\Order $_order */
|
||||
$_order = $_item->getOrder();
|
||||
?>
|
||||
|
||||
<?= /* @noEscape */ $_order->formatPrice($_item->getRowTotal()) ?>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Framework\Escaper $escaper */
|
||||
/** @var \Magento\Sales\Model\Order\Item $_item */
|
||||
$_item = $block->getItem() ?>
|
||||
<tr>
|
||||
<td class="item-info<?= ($block->getItemOptions() ? ' has-extra' : '') ?>">
|
||||
<p class="product-name"><?= $escaper->escapeHtml($_item->getName()) ?></p>
|
||||
<p class="sku"><?= $escaper->escapeHtml(__('SKU')) ?>: <?= $escaper->escapeHtml($block->getSku($_item)) ?></p>
|
||||
<?php if ($block->getItemOptions()): ?>
|
||||
<dl class="item-options">
|
||||
<?php foreach ($block->getItemOptions() as $option): ?>
|
||||
<dt><strong><em><?= $escaper->escapeHtml($option['label']) ?></em></strong></dt>
|
||||
<dd>
|
||||
<?= /* @noEscape */ nl2br($option['value']) ?>
|
||||
</dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
<?php $addInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
|
||||
<?php if ($addInfoBlock): ?>
|
||||
<?= $addInfoBlock->setItem($_item->getOrderItem())->toHtml() ?>
|
||||
<?php endif; ?>
|
||||
<?= $escaper->escapeHtml($_item->getDescription()) ?>
|
||||
</td>
|
||||
<td class="item-qty"><?= (float) $_item->getQty() ?></td>
|
||||
</tr>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var $block \Magento\Sales\Block\Order\Totals
|
||||
* @see \Magento\Sales\Block\Order\Totals
|
||||
*/
|
||||
|
||||
?>
|
||||
<?php foreach ($block->getTotals() as $_code => $_total) : ?>
|
||||
<?php if ($_total->getBlockName()) : ?>
|
||||
<?= $block->getChildHtml($_total->getBlockName(), false) ?>
|
||||
<?php else :?>
|
||||
<tr class="<?= $block->escapeHtmlAttr($_code) ?>">
|
||||
<th colspan="2" scope="row">
|
||||
<?php if ($_total->getStrong()) : ?>
|
||||
<strong><?= $block->escapeHtml($_total->getLabel()) ?></strong>
|
||||
<?php else : ?>
|
||||
<?= $block->escapeHtml($_total->getLabel()) ?>
|
||||
<?php endif ?>
|
||||
</th>
|
||||
<td style="text-align: left" colspan="8" <?= /* @noEscape */ $block->getValueProperties() ?> data-th="<?= $block->escapeHtmlAttr($_total->getLabel()) ?>">
|
||||
<?php if ($_total->getStrong()) : ?>
|
||||
<strong><?= /* @noEscape */ $block->formatValue($_total) ?></strong>
|
||||
<?php else : ?>
|
||||
<?= /* @noEscape */ $block->formatValue($_total) ?>
|
||||
<?php endif?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endforeach?>
|
||||
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
|
||||
/** @var $block \Stemcell\Sales\Block\Order\Email\Salesperson\Items */
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @notice
|
||||
* 同一笔订单,可能因为用户在购物车给不同商品选择的账户(lab)不一样,这时对应的销售(salesperson)可能不一样,
|
||||
* 因此同一个订单需要根据销售来拆分,这就导致同一个订单可能发多个邮件给不同的销售。因此这个的order_items并不是订单的全部items。
|
||||
* 此数据来源于\Stemcell\Sales\Observer\SalespersonNotify。
|
||||
* 故此,order-totals的总额不能用order的grand total
|
||||
*/
|
||||
$_order = $block->getOrder();
|
||||
$_items = $_order->getAllVisibleItems();
|
||||
$customerNote = $block->getOrder()->getCustomerNote();
|
||||
?>
|
||||
<?php ?>
|
||||
<?php if (!empty($_items)) : ?>
|
||||
<!-- --><?php //$_items = $_order->getAllItems(); ?>
|
||||
<table class="email-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="item-info" style="text-align: left">
|
||||
货号
|
||||
</th>
|
||||
<th class="item-qty" style="text-align: left">
|
||||
商品名称
|
||||
</th>
|
||||
<th class="item-price" style="text-align: left">
|
||||
经销商价格
|
||||
</th>
|
||||
<th class="item-price" style="text-align: left">
|
||||
数量
|
||||
</th>
|
||||
<th class="item-price" style="text-align: left">
|
||||
折扣
|
||||
</th>
|
||||
<th class="item-price" style="text-align: left">
|
||||
总金额
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach ($_items as $_item) : ?>
|
||||
<?php if (!$_item->getParentItem()) : ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left"><?= $_item->getSku() ?></td>
|
||||
<td style="text-align: left"><?= $_item->getProductOptionByCode('simple_name')??$_item->getName() ?></td>
|
||||
<td style="text-align: left">¥<?= $block->getPrice($_item) ?></td>
|
||||
<td style="text-align: left"><?= $_item->getQtyOrdered() ?></td>
|
||||
<td style="text-align: left"><?= number_format($_item->getCustomerDiscountPercent(), 2) ?>%</td>
|
||||
<td style="text-align: left">¥<?= $_item->getRowTotal() ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<tfoot class="order-totals">
|
||||
<tr>
|
||||
<td colspan="1" style="text-align: right"><strong>小计:</strong></td>
|
||||
<td colspan="5" style="text-align: left">
|
||||
<?= '¥'.number_format($_order->getSubtotal(), 2) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1" style="text-align: right"><strong>优惠金额:</strong></td>
|
||||
<td colspan="5" style="text-align: left">
|
||||
<?= '¥'.number_format($_order->getData('customer_discount'), 2) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1" style="text-align: right"><strong>总额:</strong></td>
|
||||
<td colspan="5" style="text-align: left">
|
||||
<?= '¥'.number_format($_order->getGrandTotal(), 2) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($customerNote): ?>
|
||||
|
||||
<tr class="order_note">
|
||||
<th colspan="1" style="text-align: right">
|
||||
<strong>订单备注:</strong>
|
||||
</th>
|
||||
<td colspan="5" style="text-align: left" >
|
||||
<?= /* @noEscape */ $block->escapeHtml($customerNote) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
?>
|
||||
<?php $_shipment = $block->getShipment() ?>
|
||||
<?php $_order = $block->getOrder() ?>
|
||||
<?php if ($_shipment && $_order) : ?>
|
||||
<table class="email-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="item-info">
|
||||
<?= $block->escapeHtml(__('Items')) ?>
|
||||
</th>
|
||||
<th class="item-qty">
|
||||
<?= $block->escapeHtml(__('Qty')) ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach ($_shipment->getAllItems() as $_item) : ?>
|
||||
<?php if (!$_item->getOrderItem()->getParentItem()) : ?>
|
||||
<tbody>
|
||||
<?= $block->getItemHtml($_item) ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
?>
|
||||
<?php /* @var \Magento\Framework\View\Element\Template $block */ ?>
|
||||
<?php $_shipment = $block->getShipment() ?>
|
||||
<?php
|
||||
/* @var \Magento\Sales\Model\Order $_order */
|
||||
$_order = $block->getOrder() ?>
|
||||
<?php if ($_shipment && $_order) : ?>
|
||||
<?php $trackCollection = $_shipment->getTracksCollection() ?>
|
||||
<?php if ($trackCollection) : ?>
|
||||
<br />
|
||||
<table class="shipment-track">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $block->escapeHtml(__('Shipped By')) ?></th>
|
||||
<th><?= $block->escapeHtml(__('Tracking Number')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($trackCollection as $_item) : ?>
|
||||
<tr>
|
||||
<td><?= $block->escapeHtml($_item->getTitle()) ?>:</td>
|
||||
<td>
|
||||
<a href="<?= $block->escapeUrl($block->getTrackingUrl()->getUrl($_item)) ?>" target="_blank">
|
||||
<?= $block->escapeHtml($_item->getNumber()) ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
/** @var \Magento\Sales\Block\Order\History $block */
|
||||
?>
|
||||
<?php
|
||||
$_orders = $block->getOrders();
|
||||
$currentUrl = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
?>
|
||||
<?= $block->getChildHtml('info') ?>
|
||||
<?php if ($_orders && count($_orders)) : ?>
|
||||
<div class="search-technical-resources">
|
||||
<div class="search-technical-resources-form-wrapper">
|
||||
<label>请您输入订单号筛选查询</label>
|
||||
<form action="<?= $currentUrl ?>" method="get">
|
||||
<input type="text" name="q" value="" placeholder="例如: STI20251112a00070" class="input-text" maxlength="50" autocomplete="off">
|
||||
<button type="submit" class="sc-button orange">确定</button>
|
||||
</form>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="table-wrapper orders-history">
|
||||
<table class="data table table-order-items history" id="my-orders-table">
|
||||
<caption class="table-caption"><?= $block->escapeHtml(__('Orders')) ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="col id"><?= $block->escapeHtml(__('Order #')) ?></th>
|
||||
<th scope="col" class="col date"><?= $block->escapeHtml(__('Date')) ?></th>
|
||||
|
||||
<th scope="col" class="col total"><?= $block->escapeHtml(__('Order Total')) ?></th>
|
||||
<th scope="col" class="col status"><?= $block->escapeHtml(__('Order Status')) ?></th>
|
||||
<th scope="col" class="col actions"><?= $block->escapeHtml(__('Action')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($_orders as $_order) : ?>
|
||||
<tr>
|
||||
<td data-th="<?= $block->escapeHtml(__('Order #')) ?>" class="col id"><?= $block->escapeHtml($_order->getRealOrderId()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Date')) ?>" class="col date"><?= /* @noEscape */ $block->formatDate($_order->getCreatedAt()) ?></td>
|
||||
|
||||
<td data-th="<?= $block->escapeHtml(__('Order Total')) ?>" class="col total"><?= /* @noEscape */ $_order->formatPrice($_order->getGrandTotal()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Order Status')) ?>" class="col status"><?= $block->escapeHtml($_order->getStatusLabel()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions">
|
||||
<a href="<?= $block->escapeUrl($block->getViewUrl($_order)) ?>" class="action view">
|
||||
<span><?= $block->escapeHtml(__('View Order')) ?></span>
|
||||
</a>
|
||||
<?php if ($this->helper(\Magento\Sales\Helper\Reorder::class)->canReorder($_order->getEntityId())) : ?>
|
||||
<a href="#" data-post='<?= /* @noEscape */
|
||||
$this->helper(\Magento\Framework\Data\Helper\PostHelper::class)
|
||||
->getPostData($block->getReorderUrl($_order))
|
||||
?>' class="action order">
|
||||
<span><?= $block->escapeHtml(__('Reorder')) ?></span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php if ($block->getPagerHtml()) : ?>
|
||||
<div class="order-products-toolbar toolbar bottom"><?= $block->getPagerHtml() ?></div>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<div class="message info empty"><span><?= $block->escapeHtml($block->getEmptyOrdersMessage()) ?></span></div>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
<?php /** @var $block \Stemcell\Sales\Block\Order\Info */ ?>
|
||||
<?php $_order = $block->getOrder() ?>
|
||||
<div class="block block-order-details-view">
|
||||
|
||||
<div class="block-title">
|
||||
<strong><?= $block->escapeHtml(__('Order Information')) ?></strong>
|
||||
</div>
|
||||
<div class="block-content">
|
||||
<?php if (!$_order->getIsVirtual()) : ?>
|
||||
<div class="box box-order-shipping-address">
|
||||
<strong class="box-title"><span><?= $block->escapeHtml(__('Shipping Address')) ?></span></strong>
|
||||
<div class="box-content">
|
||||
<address><?= /* @noEscape */ $block->getFormattedAddress($_order->getShippingAddress()) ?></address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-order-shipping-method">
|
||||
<strong class="box-title">
|
||||
<span><?= $block->escapeHtml(__('Shipping Method')) ?></span>
|
||||
</strong>
|
||||
<div class="box-content">
|
||||
<?php if ($_order->getShippingDescription()) : ?>
|
||||
<?= $block->escapeHtml($_order->getShippingDescription()) ?>
|
||||
<?php else : ?>
|
||||
<?= $block->escapeHtml(__('No shipping information available')) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$orderState= $_order->getState();
|
||||
if ($orderState == \Magento\Sales\Model\Order::STATE_NEW):
|
||||
?>
|
||||
<div class="actions">
|
||||
<a href="/stemcell_sales/order/cancel?order_id=<?php echo $_order->getId()?>" class="action primary cancel-order">
|
||||
<span>取消订单</span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
?>
|
||||
<div class="actions">
|
||||
<?php $_order = $block->getOrder() ?>
|
||||
<?php if ($this->helper(\Magento\Sales\Helper\Reorder::class)->canReorder($_order->getEntityId())) : ?>
|
||||
<a href="#" data-post='<?=
|
||||
/* @noEscape */ $this->helper(\Magento\Framework\Data\Helper\PostHelper::class)
|
||||
->getPostData($block->getReorderUrl($_order))
|
||||
?>' class="action order">
|
||||
<span><?= $block->escapeHtml(__('Reorder')) ?></span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<a href="<?= $block->escapeUrl($block->getPrintUrl($_order)) ?>"
|
||||
class="action print"
|
||||
target="_blank"
|
||||
rel="noopener">
|
||||
<span><?= $block->escapeHtml(__('Print Order')) ?></span>
|
||||
</a>
|
||||
<?= $block->getChildHtml() ?>
|
||||
</div>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var $block \Magento\Sales\Block\Order\Info\Buttons\Rss */
|
||||
?>
|
||||
<?php if ($block->isRssAllowed() && $block->getLink()) : ?>
|
||||
<a href="<?= $block->escapeHtmlAttr($block->getLink()) ?>" class="action rss">
|
||||
<span><?= $block->escapeHtml($block->getLabel()) ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
|
||||
/** @var \Magento\Sales\Block\Order\Items $block */
|
||||
?>
|
||||
<div class="table-wrapper order-items">
|
||||
<table class="data table table-order-items" id="my-orders-table" summary="<?= $block->escapeHtml(__('Items Ordered')) ?>">
|
||||
<caption class="table-caption"><?= $block->escapeHtml(__('Items Ordered')) ?></caption>
|
||||
<thead>
|
||||
<?php if ($block->isPagerDisplayed()) : ?>
|
||||
<tr>
|
||||
<td colspan="8" data-block="order-items-pager-top" class="order-pager-wrapper order-pager-wrapper-top">
|
||||
<?= $block->getPagerHtml() ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<tr>
|
||||
<th class="col name" width="170"><?= $block->escapeHtml(__('Product Name')) ?></th>
|
||||
<th class="col sku" width="100"><?= $block->escapeHtml(__('产品号')) ?></th>
|
||||
<th class="col price2" width="80"><?= $block->escapeHtml(__('经销商价格')) ?></th>
|
||||
<th class="col qty2"><?= $block->escapeHtml(__('Qty')) ?></th>
|
||||
<th class="col discount"><?= $block->escapeHtml(__('折扣')) ?></th>
|
||||
<th class="col subtotal2"><?= $block->escapeHtml(__('总价')) ?></th>
|
||||
<th class="col account" width="130"><?= $block->escapeHtml(__('终端账户信息')) ?></th>
|
||||
<th class="col note" width="150"><?= $block->escapeHtml(__('备注')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $items = $block->getItems(); ?>
|
||||
<?php $giftMessage = ''?>
|
||||
<?php foreach ($items as $item) :
|
||||
if ($item->getParentItem()) :
|
||||
continue;
|
||||
endif;
|
||||
?>
|
||||
<tbody>
|
||||
<?= $block->getItemHtml($item) ?>
|
||||
<?php if ($this->helper(\Magento\GiftMessage\Helper\Message::class)->isMessagesAllowed('order_item', $item) && $item->getGiftMessageId()) : ?>
|
||||
<?php $giftMessage = $this->helper(\Magento\GiftMessage\Helper\Message::class)->getGiftMessageForEntity($item); ?>
|
||||
<tr>
|
||||
<td class="col options" colspan="8">
|
||||
<a href="#"
|
||||
id="order-item-gift-message-link-<?= (int) $item->getId() ?>"
|
||||
class="action show"
|
||||
aria-controls="order-item-gift-message-<?= (int) $item->getId() ?>"
|
||||
data-item-id="<?= (int) $item->getId() ?>">
|
||||
<?= $block->escapeHtml(__('Gift Message')) ?>
|
||||
</a>
|
||||
<?php $giftMessage = $this->helper(\Magento\GiftMessage\Helper\Message::class)->getGiftMessageForEntity($item); ?>
|
||||
<div class="order-gift-message" id="order-item-gift-message-<?= (int) $item->getId() ?>" role="region" aria-expanded="false" tabindex="-1">
|
||||
<a href="#"
|
||||
title="<?= $block->escapeHtml(__('Close')) ?>"
|
||||
aria-controls="order-item-gift-message-<?= (int) $item->getId() ?>"
|
||||
data-item-id="<?= (int) $item->getId() ?>"
|
||||
class="action close">
|
||||
<?= $block->escapeHtml(__('Close')) ?>
|
||||
</a>
|
||||
<dl class="item-options">
|
||||
<dt class="item-sender"><strong class="label"><?= $block->escapeHtml(__('From')) ?></strong><?= $block->escapeHtml($giftMessage->getSender()) ?></dt>
|
||||
<dt class="item-recipient"><strong class="label"><?= $block->escapeHtml(__('To')) ?></strong><?= $block->escapeHtml($giftMessage->getRecipient()) ?></dt>
|
||||
<dd class="item-message"><?= /* @noEscape */ $this->helper(\Magento\GiftMessage\Helper\Message::class)->getEscapedGiftMessage($item) ?></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
</tbody>
|
||||
<?php endforeach; ?>
|
||||
<tfoot>
|
||||
<?php if ($block->isPagerDisplayed()) : ?>
|
||||
<tr>
|
||||
<td colspan="8" data-block="order-items-pager-bottom" class="order-pager-wrapper order-pager-wrapper-bottom">
|
||||
<?= $block->getPagerHtml() ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<?= $block->getChildHtml('order_totals') ?>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<?php if ($giftMessage) : ?>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"a.action.show, a.action.close": {
|
||||
"giftMessage": {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var \Stemcell\Sales\Block\Order\Item\Renderer\DefaultRenderer $block
|
||||
* @var \Magento\Framework\Locale\LocaleFormatter $localeFormatter
|
||||
* @var \Magento\Sales\Model\Order\Item $_item
|
||||
*/
|
||||
$_item = $block->getItem();
|
||||
$productName = $_item->getProductOptionByCode('simple_name')??$_item->getName();
|
||||
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
|
||||
$_product = $objectManager->create('Magento\Catalog\Model\Product')->load($_item->getProductId());
|
||||
?>
|
||||
<tr id="order-item-row-<?= (int) $_item->getId() ?>">
|
||||
<td class="col name" data-th="<?= $block->escapeHtml(__('Product Name')) ?>">
|
||||
<strong class="product name product-item-name"><?= $block->escapeHtml($productName) ?></strong>
|
||||
|
||||
<?php $addtInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
|
||||
<?php if ($addtInfoBlock): ?>
|
||||
<?= $addtInfoBlock->setItem($_item)->toHtml() ?>
|
||||
<?php endif; ?>
|
||||
<?= $block->escapeHtml($_item->getDescription()) ?>
|
||||
</td>
|
||||
<td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>">
|
||||
<?= /* @noEscape */ $block->prepareSku($block->getSku()) ?>
|
||||
</td>
|
||||
<td class="col price2" data-th="<?= $block->escapeHtml(__('Price')) ?>">
|
||||
<?= $block->getItemPriceHtml() ?>
|
||||
</td>
|
||||
<td class="col qty2" data-th="<?= $block->escapeHtml(__('Qty')) ?>">
|
||||
<ul class="items-qty">
|
||||
<?php if ($block->getItem()->getQtyOrdered() > 0): ?>
|
||||
<li class="item">
|
||||
<span class="content">
|
||||
<?= $block->escapeHtml($localeFormatter->formatNumber((float) $block->getItem()->getQtyOrdered()))?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="col discount" data-th="<?= $block->escapeHtml(__('Discount')) ?>">
|
||||
<?= $block->getCustomDiscountPercent($_item) ?>
|
||||
</td>
|
||||
<td class="col subtotal2" data-th="<?= $block->escapeHtml(__('Subtotal')) ?>">
|
||||
<?= $block->getItemRowTotalHtml() ?>
|
||||
</td>
|
||||
<td class="col account" data-th="<?= $block->escapeHtml(__('终端账户信息')) ?>">
|
||||
<?= $block->getLabBookingAccount($_item) ?>
|
||||
</td>
|
||||
<td class="col note" data-th="<?= $block->escapeHtml(__('备注')) ?>">
|
||||
<?= $block->escapeHtml(
|
||||
$block->getItem()->getData('note')
|
||||
)?>
|
||||
</td>
|
||||
</tr>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
use Stemcell\Sales\Model\OrderStatus;
|
||||
|
||||
?>
|
||||
<?php
|
||||
/** @var $block \Stemcell\Sales\Block\Order\View*/
|
||||
$_history = $block->getRejectComment();
|
||||
$rejectStatus = OrderStatus::rejected->name
|
||||
?>
|
||||
|
||||
<?php if ($_history->count() && $block->isOrderRejected()) : ?>
|
||||
<div class="block block-order-details-comments">
|
||||
<div class="block-title"><strong><?= $block->escapeHtml(__('订单驳回原因:')) ?></strong></div>
|
||||
<div class="block-content">
|
||||
<dl class="order-comments">
|
||||
<?php
|
||||
foreach ($_history as $_historyItem) :
|
||||
if ($_historyItem->getStatus() !== $rejectStatus) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
|
||||
<dd class="comment-content"><?= $block->escapeHtml($_historyItem->getComment(), ['b', 'br', 'strong', 'i', 'u', 'a']) ?></dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
?>
|
||||
<?php /** @var $block \Magento\Sales\Block\Order\Info */ ?>
|
||||
|
||||
<span class="order-status"><?= $block->escapeHtml($block->getOrder()->getStatusLabel()) ?></span>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
|
||||
/** @var $block \Magento\Sales\Block\Order\Recent */
|
||||
?>
|
||||
<div class="block block-dashboard-orders">
|
||||
<?php
|
||||
$_orders = $block->getOrders();
|
||||
$count = count($_orders);
|
||||
?>
|
||||
<div class="block-title order">
|
||||
<strong><?= $block->escapeHtml(__('Recent Orders')) ?></strong>
|
||||
<?php if ($count > 0) : ?>
|
||||
<a class="action view" href="<?= $block->escapeUrl($block->getUrl('sales/order/history')) ?>">
|
||||
<span><?= $block->escapeHtml(__('View All')) ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="block-content">
|
||||
<?= $block->getChildHtml() ?>
|
||||
<?php if ($count > 0) : ?>
|
||||
<div class="table-wrapper orders-recent">
|
||||
<table class="data table table-order-items recent" id="my-orders-table">
|
||||
<caption class="table-caption"><?= $block->escapeHtml(__('Recent Orders')) ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="col id"><?= $block->escapeHtml(__('Order #')) ?></th>
|
||||
<th scope="col" class="col date"><?= $block->escapeHtml(__('Date')) ?></th>
|
||||
<th scope="col" class="col total"><?= $block->escapeHtml(__('Order Total')) ?></th>
|
||||
<th scope="col" class="col status"><?= $block->escapeHtml(__('订单状态')) ?></th>
|
||||
<th scope="col" class="col actions"><?= $block->escapeHtml(__('Action')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($_orders as $_order) : ?>
|
||||
<tr>
|
||||
<td data-th="<?= $block->escapeHtml(__('Order #')) ?>" class="col id"><?= $block->escapeHtml($_order->getRealOrderId()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Date')) ?>" class="col date"><?= $block->escapeHtml($block->formatDate($_order->getCreatedAt())) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Order Total')) ?>" class="col total"><?= /* @noEscape */ $_order->formatPrice($_order->getGrandTotal()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Order Status')) ?>" class="col status"><?= $block->escapeHtml($_order->getStatusLabel()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions">
|
||||
<a href="<?= $block->escapeUrl($block->getViewUrl($_order)) ?>" class="action view">
|
||||
<span><?= $block->escapeHtml(__('View Order')) ?></span>
|
||||
</a>
|
||||
<?php if ($this->helper(\Magento\Sales\Helper\Reorder::class)
|
||||
->canReorder($_order->getEntityId())
|
||||
) : ?>
|
||||
<a href="#" data-post='<?= /* @noEscape */
|
||||
$this->helper(\Magento\Framework\Data\Helper\PostHelper::class)
|
||||
->getPostData($block->getReorderUrl($_order))
|
||||
?>' class="action order">
|
||||
<span><?= $block->escapeHtml(__('Reorder')) ?></span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="message info empty"><span><?= $block->escapeHtml(__('You have placed no orders.')) ?></span></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var $block \Magento\Sales\Block\Order\Totals
|
||||
* @see \Magento\Sales\Block\Order\Totals
|
||||
*/
|
||||
?>
|
||||
<?php foreach ($block->getTotals() as $_code => $_total) : ?>
|
||||
<?php if ($_total->getBlockName()) : ?>
|
||||
<?= $block->getChildHtml($_total->getBlockName(), false) ?>
|
||||
<?php else :?>
|
||||
<tr class="<?= $block->escapeHtmlAttr($_code) ?>">
|
||||
<th colspan="7" scope="row">
|
||||
<?php if ($_total->getStrong()) : ?>
|
||||
<strong><?= $block->escapeHtml($_total->getLabel()) ?></strong>
|
||||
<?php else : ?>
|
||||
<?= $block->escapeHtml($_total->getLabel()) ?>
|
||||
<?php endif ?>
|
||||
</th>
|
||||
<td <?= /* @noEscape */ $block->getValueProperties() ?> data-th="<?= $block->escapeHtmlAttr($_total->getLabel()) ?>">
|
||||
<?php if ($_total->getStrong()) : ?>
|
||||
<strong><?= /* @noEscape */ $block->formatValue($_total) ?></strong>
|
||||
<?php else : ?>
|
||||
<?= /* @noEscape */ $block->formatValue($_total) ?>
|
||||
<?php endif?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endforeach?>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Magento2.Templates.ThisInTemplate
|
||||
?>
|
||||
<?php /** @var $block \Magento\Sales\Block\Order\View*/?>
|
||||
<div class="order-details-items ordered">
|
||||
<?php $_order = $block->getOrder() ?>
|
||||
|
||||
<div class="order-title">
|
||||
<?php if (!empty($_order->getTracksCollection()->getItems())) : ?>
|
||||
<?= $block->getChildHtml('tracking-info-link') ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?= $block->getChildHtml('order_items') ?>
|
||||
|
||||
<?php if ($this->helper(\Magento\GiftMessage\Helper\Message::class)->isMessagesAllowed('order', $_order)
|
||||
&& $_order->getGiftMessageId()
|
||||
) : ?>
|
||||
<div class="block block-order-details-gift-message">
|
||||
<div class="block-title"><strong><?= $block->escapeHtml(__('Gift Message for This Order')) ?></strong></div>
|
||||
<?php
|
||||
$_giftMessage = $this->helper(\Magento\GiftMessage\Helper\Message::class)->getGiftMessageForEntity($_order);
|
||||
?>
|
||||
<div class="block-content">
|
||||
<dl class="item-options">
|
||||
<dt class="item-sender"><strong class="label"><?= $block->escapeHtml(__('From')) ?></strong><?= $block->escapeHtml($_giftMessage->getSender()) ?></dt>
|
||||
<dt class="item-recipient"><strong class="label"><?= $block->escapeHtml(__('To')) ?></strong><?= $block->escapeHtml($_giftMessage->getRecipient()) ?></dt>
|
||||
<dd class="item-message">
|
||||
<?= /* @noEscape */
|
||||
$this->helper(\Magento\GiftMessage\Helper\Message::class)->getEscapedGiftMessage($_order) ?>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="actions-toolbar">
|
||||
<div class="secondary">
|
||||
<a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>">
|
||||
<span><?= $block->escapeHtml($block->getBackTitle()) ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($customerNote = $_order->getCustomerNote()) : ?>
|
||||
<div class="customer-note block">
|
||||
<div class="block-title">
|
||||
<strong>订单备注</strong>
|
||||
</div>
|
||||
<div class="block-content">
|
||||
<?= $block->escapeHtml($customerNote) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Last ordered items sidebar
|
||||
*
|
||||
* @var $block \Magento\Sales\Block\Reorder\Sidebar
|
||||
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
|
||||
*/
|
||||
?>
|
||||
<div class="block block-reorder" data-bind="scope: 'lastOrderedItems'">
|
||||
<div class="block-title no-display"
|
||||
data-bind="css: {'no-display': !lastOrderedItems().items || lastOrderedItems().items.length === 0}">
|
||||
<strong id="block-reorder-heading" role="heading" aria-level="2">
|
||||
<?= $block->escapeHtml(__('Recently Ordered')) ?>
|
||||
</strong>
|
||||
</div>
|
||||
<div class="block-content no-display"
|
||||
data-bind="css: {'no-display': !lastOrderedItems().items || lastOrderedItems().items.length === 0}"
|
||||
aria-labelledby="block-reorder-heading">
|
||||
<form method="post" class="form reorder"
|
||||
action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>" id="reorder-validate-detail">
|
||||
<strong class="subtitle"><?= $block->escapeHtml(__('Last Ordered Items')) ?></strong>
|
||||
<ol id="cart-sidebar-reorder" class="product-items product-items-names"
|
||||
data-bind="foreach: lastOrderedItems().items">
|
||||
<li class="product-item">
|
||||
<div class="field item choice">
|
||||
<label class="label" data-bind="attr: {'for': 'reorder-item-' + id}">
|
||||
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="checkbox" name="order_items[]"
|
||||
data-bind="attr: {
|
||||
id: 'reorder-item-' + id,
|
||||
value: id,
|
||||
title: is_saleable ? '<?= $block->escapeHtml(__('Add to Cart')) ?>' :
|
||||
'<?= $block->escapeHtml(__('Product is not salable.')) ?>'
|
||||
},
|
||||
disable: !is_saleable"
|
||||
class="checkbox" data-validate='{"validate-one-checkbox-required-by-name": true}'/>
|
||||
</div>
|
||||
</div>
|
||||
<strong class="product-item-name">
|
||||
<a data-bind="attr: {href: url}" class="product-item-link">
|
||||
<span data-bind="text: name"></span>
|
||||
</a>
|
||||
</strong>
|
||||
</li>
|
||||
</ol>
|
||||
<div id="cart-sidebar-reorder-advice-container"></div>
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary"
|
||||
data-bind="visible: isShowAddToCart">
|
||||
<button type="submit" title="<?= $block->escapeHtml(__('Add to Cart')) ?>"
|
||||
class="action tocart primary">
|
||||
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<a class="action view"
|
||||
href="<?= $block->escapeUrl($block->getUrl('customer/account')) ?>#my-orders-table">
|
||||
<span><?= $block->escapeHtml(__('View All')) ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php $scriptString = <<<script
|
||||
require(["jquery", "mage/mage"], function(jQuery){
|
||||
jQuery('#reorder-validate-detail').mage('validation', {
|
||||
errorPlacement: function(error, element) {
|
||||
error.appendTo('#cart-sidebar-reorder-advice-container');
|
||||
}
|
||||
});
|
||||
});
|
||||
script;
|
||||
?>
|
||||
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
|
||||
</div>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Ui/js/core/app": {
|
||||
"components": {
|
||||
"lastOrderedItems": {
|
||||
"component": "Magento_Sales/js/view/last-ordered-items"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user