Skip to content

Commit

Permalink
fix static
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Charlie committed Sep 8, 2020
1 parent 798e61f commit 0472281
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<tr id="order-item-row-<?= (int) $_item->getId() ?>">
<td class="col name" data-th="<?= $block->escapeHtmlAttr(__('Product Name')) ?>">
<strong class="product name product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
<?php if ($_options = $block->getItemOptions()) : ?>
<?php if ($_options = $block->getItemOptions()): ?>
<dl class="item-options">
<?php foreach ($_options as $_option) : ?>
<?php foreach ($_options as $_option): ?>
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
<?php if (!$block->getPrintStatus()) : ?>
<?php if (!$block->getPrintStatus()): ?>
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
<dd<?= (isset($_formatedOptionValue['full_view']) ? ' class="tooltip wrapper"' : '') ?>>
<?= $block->escapeHtml($_formatedOptionValue['value'], ['a']) ?>
<?php if (isset($_formatedOptionValue['full_view'])) : ?>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<div class="tooltip content">
<dl class="item options">
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
Expand All @@ -27,7 +27,7 @@
</div>
<?php endif; ?>
</dd>
<?php else : ?>
<?php else: ?>
<dd>
<?= $block->escapeHtml($_option['print_value'] ?? $_option['value']) ?>
</dd>
Expand All @@ -37,31 +37,35 @@
<?php endif; ?>

<?php /* downloadable */ ?>
<?php if ($links = $block->getLinks()) : ?>
<?php if ($links = $block->getLinks()): ?>
<dl class="item options">
<dt><?= $block->escapeHtml($block->getLinksTitle()) ?></dt>
<?php foreach ($links->getPurchasedItems() as $link) : ?>
<?php foreach ($links->getPurchasedItems() as $link): ?>
<dd><?= $block->escapeHtml($link->getLinkTitle()) ?></dd>
<?php endforeach; ?>
</dl>
<?php endif; ?>
<?php /* EOF downloadable */ ?>

<?php $addInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
<?php if ($addInfoBlock) : ?>
<?php if ($addInfoBlock): ?>
<?= $addInfoBlock->setItem($_item->getOrderItem())->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 sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>">
<?= /* @noEscape */ $block->prepareSku($block->getSku()) ?>
</td>
<td class="col price" data-th="<?= $block->escapeHtml(__('Price')) ?>">
<?= $block->getItemPriceHtml() ?>
</td>
<td class="col qty" data-th="<?= $block->escapeHtml(__('Qty')) ?>"><?= (float) $_item->getQty() ?></td>
<td class="col subtotal" data-th="<?= $block->escapeHtml(__('Subtotal')) ?>">
<?= $block->getItemRowTotalHtml() ?>
</td>
<td class="col discount" data-th="<?= $block->escapeHtml(__('Discount Amount')) ?>"><?= /* @noEscape */ $_order->formatPrice(-$_item->getDiscountAmount()) ?></td>
<td class="col discount" data-th="<?= $block->escapeHtml(__('Discount Amount')) ?>">
<?= /* @noEscape */ $_order->formatPrice(-$_item->getDiscountAmount()) ?>
</td>
<td class="col total" data-th="<?= $block->escapeHtml(__('Row Total')) ?>">
<?= $block->getItemRowTotalAfterDiscountHtml() ?>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<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($_item->getName()) ?></strong>
<?php if ($_options = $block->getItemOptions()) : ?>
<?php if ($_options = $block->getItemOptions()): ?>
<dl class="item-options">
<?php foreach ($_options as $_option) : ?>
<?php foreach ($_options as $_option): ?>
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
<?php if (!$block->getPrintStatus()) : ?>
<?php if (!$block->getPrintStatus()): ?>
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
<dd<?= (isset($_formatedOptionValue['full_view']) ? ' class="tooltip wrapper"' : '') ?>>
<?= $block->escapeHtml($_formatedOptionValue['value'], ['a']) ?>
<?php if (isset($_formatedOptionValue['full_view'])) : ?>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<div class="tooltip content">
<dl class="item options">
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
Expand All @@ -27,19 +27,21 @@
</div>
<?php endif; ?>
</dd>
<?php else : ?>
<?php else: ?>
<dd><?= $block->escapeHtml($_option['print_value'] ?? $_option['value']) ?></dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
<?php endif; ?>
<?php $addInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
<?php if ($addInfoBlock) :?>
<?php if ($addInfoBlock): ?>
<?= $addInfoBlock->setItem($_item->getOrderItem())->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 sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>">
<?= /* @noEscape */ $block->prepareSku($block->getSku()) ?>
</td>
<td class="col price" data-th="<?= $block->escapeHtml(__('Price')) ?>">
<?= $block->getItemPriceHtml() ?>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ $_item = $block->getItem();
<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($_item->getName()) ?></strong>
<?php if ($_options = $block->getItemOptions()) : ?>
<?php if ($_options = $block->getItemOptions()): ?>
<dl class="item-options">
<?php foreach ($_options as $_option) : ?>
<?php foreach ($_options as $_option): ?>
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
<?php if (!$block->getPrintStatus()) : ?>
<?php if (!$block->getPrintStatus()): ?>
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
<dd<?= (isset($_formatedOptionValue['full_view']) ? ' class="tooltip wrapper"' : '') ?>>
<?= $block->escapeHtml($_formatedOptionValue['value'], ['a']) ?>
<?php if (isset($_formatedOptionValue['full_view'])) : ?>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<div class="tooltip content">
<dl class="item options">
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
Expand All @@ -27,43 +27,46 @@ $_item = $block->getItem();
</div>
<?php endif; ?>
</dd>
<?php else : ?>
<dd><?= $block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
<?php else: ?>
<?php $optionValue = isset($_option['print_value']) ? $_option['print_value'] : $_option['value'] ?>
<dd><?= $block->escapeHtml($optionValue) ?></dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
<?php endif; ?>
<?php $addtInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
<?php if ($addtInfoBlock) : ?>
<?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 sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>">
<?= /* @noEscape */ $block->prepareSku($block->getSku()) ?>
</td>
<td class="col price" data-th="<?= $block->escapeHtml(__('Price')) ?>">
<?= $block->getItemPriceHtml() ?>
</td>
<td class="col qty" data-th="<?= $block->escapeHtml(__('Qty')) ?>">
<ul class="items-qty">
<?php if ($block->getItem()->getQtyOrdered() > 0) : ?>
<?php if ($block->getItem()->getQtyOrdered() > 0): ?>
<li class="item">
<span class="title"><?= $block->escapeHtml(__('Ordered')) ?></span>
<span class="content"><?= (float) $block->getItem()->getQtyOrdered() ?></span>
</li>
<?php endif; ?>
<?php if ($block->getItem()->getQtyShipped() > 0) : ?>
<?php if ($block->getItem()->getQtyShipped() > 0): ?>
<li class="item">
<span class="title"><?= $block->escapeHtml(__('Shipped')) ?></span>
<span class="content"><?= (float) $block->getItem()->getQtyShipped() ?></span>
</li>
<?php endif; ?>
<?php if ($block->getItem()->getQtyCanceled() > 0) : ?>
<?php if ($block->getItem()->getQtyCanceled() > 0): ?>
<li class="item">
<span class="title"><?= $block->escapeHtml(__('Canceled')) ?></span>
<span class="content"><?= (float) $block->getItem()->getQtyCanceled() ?></span>
</li>
<?php endif; ?>
<?php if ($block->getItem()->getQtyRefunded() > 0) : ?>
<?php if ($block->getItem()->getQtyRefunded() > 0): ?>
<li class="item">
<span class="title"><?= $block->escapeHtml(__('Refunded')) ?></span>
<span class="content"><?= (float) $block->getItem()->getQtyRefunded() ?></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
<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($_item->getName()) ?></strong>
<?php if ($_options = $block->getItemOptions()) : ?>
<?php if ($_options = $block->getItemOptions()): ?>
<dl class="item options">
<?php foreach ($_options as $_option) : ?>
<?php foreach ($_options as $_option): ?>
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
<?php if (!$block->getPrintStatus()) : ?>
<?php if (!$block->getPrintStatus()): ?>
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
<dd<?= (isset($_formatedOptionValue['full_view']) ? ' class="tooltip wrapper"' : '') ?>>
<?= $block->escapeHtml($_formatedOptionValue['value'], ['a']) ?>
<?php if (isset($_formatedOptionValue['full_view'])) : ?>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<div class="tooltip content">
<dl class="item options">
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
Expand All @@ -26,18 +26,21 @@
</div>
<?php endif; ?>
</dd>
<?php else : ?>
<dd><?= $block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
<?php else: ?>
<?php $optionValue = isset($_option['print_value']) ? $_option['print_value'] : $_option['value'] ?>
<dd><?= $block->escapeHtml($optionValue) ?></dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
<?php endif; ?>
<?php $addInfoBlock = $block->getProductAdditionalInformationBlock(); ?>
<?php if ($addInfoBlock) : ?>
<?php if ($addInfoBlock): ?>
<?= $addInfoBlock->setItem($_item->getOrderItem())->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 sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>">
<?= /* @noEscape */ $block->prepareSku($block->getSku()) ?>
</td>
<td class="col qty" data-th="<?= $block->escapeHtml(__('Qty Shipped')) ?>"><?= (int) $_item->getQty() ?></td>
</tr>

0 comments on commit 0472281

Please sign in to comment.