You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

74 lines
3.5 KiB

  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * @var $block \Magento\Tax\Block\Checkout\Shipping
  8. * @see \Magento\Tax\Block\Checkout\Shipping
  9. * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  10. */
  11. ?>
  12. <?php if ($block->displayShipping()): ?>
  13. <?php
  14. $style = $block->escapeHtmlAttr($block->getStyle());
  15. $colspan = (int) $block->getColspan();
  16. /** @var \Magento\Checkout\Helper\Data $checkoutHelper */
  17. $checkoutHelper = $block->getData('checkoutHelper');
  18. ?>
  19. <?php if ($block->displayBoth()): ?>
  20. <tr class="totals shipping excl">
  21. <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
  22. <?= $block->escapeHtml($block->getExcludeTaxLabel()) ?>
  23. </th>
  24. <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getExcludeTaxLabel()) ?>">
  25. <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingExcludeTax()) ?>
  26. </td>
  27. </tr>
  28. <?php if ($style): ?>
  29. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.excl th.mark') ?>
  30. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.excl td.amount') ?>
  31. <?php endif; ?>
  32. <tr class="totals shipping incl">
  33. <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
  34. <?= $block->escapeHtml($block->getIncludeTaxLabel()) ?>
  35. </th>
  36. <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getIncludeTaxLabel()) ?>">
  37. <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingIncludeTax()) ?>
  38. </td>
  39. </tr>
  40. <?php if ($style): ?>
  41. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.incl th.mark') ?>
  42. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.incl td.amount') ?>
  43. <?php endif; ?>
  44. <?php elseif ($block->displayIncludeTax()): ?>
  45. <tr class="totals shipping incl">
  46. <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
  47. <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
  48. </th>
  49. <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
  50. <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingIncludeTax()) ?>
  51. </td>
  52. </tr>
  53. <?php if ($style): ?>
  54. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.incl th.mark') ?>
  55. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.incl td.amount') ?>
  56. <?php endif; ?>
  57. <?php else: ?>
  58. <tr class="totals shipping excl">
  59. <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
  60. <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
  61. </th>
  62. <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
  63. <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingExcludeTax()) ?>
  64. </td>
  65. </tr>
  66. <?php if ($style): ?>
  67. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.excl th.mark') ?>
  68. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.excl td.amount') ?>
  69. <?php endif; ?>
  70. <?php endif; ?>
  71. <?php endif; ?>