No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

77 líneas
3.3 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\Tax
  8. * @see \Magento\Tax\Block\Checkout\Tax
  9. * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  10. */
  11. ?>
  12. <?php
  13. $_value = $block->getTotal()->getValue();
  14. $_style = $block->escapeHtmlAttr($block->getTotal()->getStyle());
  15. /** @var \Magento\Tax\Helper\Data $taxHelper */
  16. $taxHelper = $block->getData('taxHelper');
  17. /** @var \Magento\Checkout\Helper\Data $checkoutHelper */
  18. $checkoutHelper = $block->getData('checkoutHelper');
  19. $attributes = 'class="totals-tax"';
  20. if ($taxHelper->displayFullSummary() && $_value != 0) {
  21. $attributes = 'class="totals-tax-summary" data-mage-init=\'{"toggleAdvanced": {"selectorsToggleClass": "shown",
  22. "baseToggleClass": "expanded", "toggleContainers": ".totals-tax-details"}}\'';
  23. }
  24. ?>
  25. <tr <?= /* @noEscape */ $attributes ?>>
  26. <th class="mark" colspan="<?= (int) $block->getColspan() ?>" scope="row">
  27. <?php if ($taxHelper->displayFullSummary()): ?>
  28. <span class="detailed"><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></span>
  29. <?php else: ?>
  30. <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
  31. <?php endif; ?>
  32. </th>
  33. <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
  34. <?= /* @noEscape */ $checkoutHelper->formatPrice($_value) ?>
  35. </td>
  36. </tr>
  37. <?php if ($_style): ?>
  38. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax th.mark') ?>
  39. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax td.amount') ?>
  40. <?php endif; ?>
  41. <?php if ($taxHelper->displayFullSummary() && $_value != 0): ?>
  42. <?php foreach ($block->getTotal()->getFullInfo() as $info): ?>
  43. <?php if (isset($info['hidden']) && $info['hidden']) { continue; } ?>
  44. <?php $percent = $info['percent']; ?>
  45. <?php $amount = $info['amount']; ?>
  46. <?php $rates = $info['rates']; ?>
  47. <?php $isFirst = 1; ?>
  48. <?php foreach ($rates as $rate): ?>
  49. <tr class="totals-tax-details">
  50. <th class="mark" colspan="<?= (int) $block->getColspan() ?>" scope="row">
  51. <?= $block->escapeHtml($rate['title']) ?>
  52. <?php if ($rate['percent'] !== null): ?>
  53. (<?= (float) $rate['percent'] ?>%)
  54. <?php endif; ?>
  55. </th>
  56. <?php if ($isFirst): ?>
  57. <td class="amount" rowspan="<?= count($rates) ?>"
  58. data-th="<?= $block->escapeHtmlAttr($rate['title']) ?>
  59. <?php if ($rate['percent'] !== null): ?>(<?= (float) $rate['percent'] ?>%)<?php endif; ?>">
  60. <?= /* @noEscape */ $checkoutHelper->formatPrice($amount) ?>
  61. </td>
  62. <?php endif; ?>
  63. </tr>
  64. <?php if ($_style): ?>
  65. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax-details th.mark') ?>
  66. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax-details td.amount') ?>
  67. <?php endif; ?>
  68. <?php $isFirst = 0; ?>
  69. <?php endforeach; ?>
  70. <?php endforeach; ?>
  71. <?php endif; ?>