totals.phtml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. // @codingStandardsIgnoreFile
  7. ?>
  8. <table class="data-table admin__table-secondary order-subtotal-table">
  9. <?php $_totals = $block->getTotals('footer')?>
  10. <?php if ($_totals):?>
  11. <tfoot>
  12. <?php foreach ($block->getTotals('footer') as $_code => $_total): ?>
  13. <?php if ($_total->getBlockName()): ?>
  14. <?= $block->getChildHtml($_total->getBlockName(), false) ?>
  15. <?php else:?>
  16. <tr class="col-<?= /* @escapeNotVerified */ $_code ?>">
  17. <td <?= /* @escapeNotVerified */ $block->getLabelProperties() ?> class="label">
  18. <strong><?= $block->escapeHtml($_total->getLabel()) ?></strong>
  19. </td>
  20. <td <?= /* @escapeNotVerified */ $block->getValueProperties() ?>>
  21. <strong><?= /* @escapeNotVerified */ $block->formatValue($_total) ?></strong>
  22. </td>
  23. </tr>
  24. <?php endif?>
  25. <?php endforeach?>
  26. </tfoot>
  27. <?php endif?>
  28. <?php $_totals = $block->getTotals('')?>
  29. <?php if ($_totals):?>
  30. <tbody>
  31. <?php foreach ($_totals as $_code => $_total): ?>
  32. <?php if ($_total->getBlockName()): ?>
  33. <?= $block->getChildHtml($_total->getBlockName(), false) ?>
  34. <?php else:?>
  35. <tr class="col-<?= /* @escapeNotVerified */ $_code ?>">
  36. <td <?= /* @escapeNotVerified */ $block->getLabelProperties() ?> class="label">
  37. <?php if ($_total->getStrong()):?>
  38. <strong><?= $block->escapeHtml($_total->getLabel()) ?></strong>
  39. <?php else:?>
  40. <?= $block->escapeHtml($_total->getLabel()) ?>
  41. <?php endif?>
  42. </td>
  43. <?php if ($_total->getStrong()):?>
  44. <td <?= /* @escapeNotVerified */ $block->getValueProperties() ?>>
  45. <strong><?= /* @escapeNotVerified */ $block->formatValue($_total) ?></strong>
  46. </td>
  47. <?php else:?>
  48. <td <?= /* @escapeNotVerified */ $block->getValueProperties() ?>>
  49. <span><?= /* @escapeNotVerified */ $block->formatValue($_total) ?></span>
  50. </td>
  51. <?php endif?>
  52. </tr>
  53. <?php endif?>
  54. <?php endforeach?>
  55. </tbody>
  56. <?php endif?>
  57. </table>