shipping.phtml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. // @codingStandardsIgnoreFile
  7. ?>
  8. <?php
  9. /**
  10. * Multishipping checkout shipping template
  11. *
  12. * @var $block \Magento\Multishipping\Block\Checkout\Shipping
  13. */
  14. ?>
  15. <form action="<?= /* @escapeNotVerified */ $block->getPostActionUrl() ?>" method="post" id="shipping_method_form" class="form multicheckout shipping">
  16. <?php foreach ($block->getAddresses() as $_index => $_address): ?>
  17. <div class="block block-shipping">
  18. <div class="block-title"><strong><?= /* @escapeNotVerified */ __('Address %1 <span>of %2</span>', ($_index+1), $block->getAddressCount()) ?></strong></div>
  19. <div class="block-content">
  20. <div class="box box-shipping-address">
  21. <strong class="box-title">
  22. <span><?= /* @escapeNotVerified */ __('Shipping To') ?></span>
  23. <a href="<?= /* @escapeNotVerified */ $block->getAddressEditUrl($_address) ?>" class="action edit"><span><?= /* @escapeNotVerified */ __('Change') ?></span></a>
  24. </strong>
  25. <div class="box-content">
  26. <address><?= /* @escapeNotVerified */ $_address->format('html') ?></address>
  27. </div>
  28. </div>
  29. <div class="box box-shipping-method">
  30. <strong class="box-title">
  31. <span><?= /* @escapeNotVerified */ __('Shipping Method') ?></span>
  32. </strong>
  33. <div class="box-content">
  34. <?php if (!($_shippingRateGroups = $block->getShippingRates($_address))): ?>
  35. <p><?= /* @escapeNotVerified */ __('Sorry, no quotes are available for this order right now.') ?></p>
  36. <?php else: ?>
  37. <dl class="items methods-shipping">
  38. <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
  39. <dt class="item-title"><?= $block->escapeHtml($block->getCarrierName($code)) ?></dt>
  40. <dd class="item-content">
  41. <fieldset class="fieldset">
  42. <legend class="legend">
  43. <span><?= $block->escapeHtml($block->getCarrierName($code)) ?></span>
  44. </legend><br>
  45. <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
  46. <div class="field choice">
  47. <?php if ($_rate->getErrorMessage()): ?>
  48. <strong><?= $block->escapeHtml($_rate->getCarrierTitle()) ?>: <?= $block->escapeHtml($_rate->getErrorMessage()) ?></strong>
  49. <?php else: ?>
  50. <div class="control">
  51. <?php if ($_sole) : ?>
  52. <input type="radio" name="shipping_method[<?= /* @escapeNotVerified */ $_address->getId() ?>]" value="<?= $block->escapeHtml($_rate->getCode()) ?>" id="s_method_<?= /* @escapeNotVerified */ $_address->getId() ?>_<?= /* @escapeNotVerified */ $_rate->getCode() ?>" class="radio solo method" checked="checked"/>
  53. <?php else: ?>
  54. <input type="radio" name="shipping_method[<?= /* @escapeNotVerified */ $_address->getId() ?>]" value="<?= /* @escapeNotVerified */ $_rate->getCode() ?>" id="s_method_<?= /* @escapeNotVerified */ $_address->getId() ?>_<?= /* @escapeNotVerified */ $_rate->getCode() ?>"<?php if($_rate->getCode()===$block->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" />
  55. <?php endif; ?>
  56. </div>
  57. <label for="s_method_<?= /* @escapeNotVerified */ $_address->getId() ?>_<?= /* @escapeNotVerified */ $_rate->getCode() ?>"><?= $block->escapeHtml($_rate->getMethodTitle()) ?>
  58. <?php $_excl = $block->getShippingPrice($_address, $_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?>
  59. <?php $_incl = $block->getShippingPrice($_address, $_rate->getPrice(), true); ?>
  60. <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?>
  61. <span class="price-including-tax" data-label="<?= /* @escapeNotVerified */ __('Incl. Tax') ?>">
  62. <?php endif; ?>
  63. <?= /* @escapeNotVerified */ $_incl ?>
  64. <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?>
  65. </span>
  66. <?php endif; ?>
  67. <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?>
  68. <span class="price-excluding-tax" data-label="<?= /* @escapeNotVerified */ __('Excl. Tax') ?>"><?= /* @escapeNotVerified */ $_excl ?></span>
  69. <?php endif; ?>
  70. </label>
  71. <?php endif ?>
  72. </div>
  73. <?php endforeach; ?>
  74. </fieldset>
  75. </dd>
  76. <?php endforeach; ?>
  77. </dl>
  78. <?php endif; ?>
  79. <?= /* @escapeNotVerified */ $block->getItemsBoxTextAfter($_address) ?>
  80. </div>
  81. </div>
  82. <div class="box box-items">
  83. <strong class="box-title">
  84. <span><?= /* @escapeNotVerified */ __('Items') ?></span>
  85. <a href="<?= /* @escapeNotVerified */ $block->getItemsEditUrl($_address) ?>" class="action edit"><span><?= /* @escapeNotVerified */ __('Edit Items') ?></span></a>
  86. </strong>
  87. <div class="box-content">
  88. <div class="table-wrapper">
  89. <table class="items data table" id="shipping-table-<?= /* @escapeNotVerified */ $_address->getId() ?>">
  90. <caption class="table-caption"><?= /* @escapeNotVerified */ __('Items') ?></caption>
  91. <thead>
  92. <tr>
  93. <th class="col item" scope="col"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
  94. <th class="col qty" scope="col"><?= /* @escapeNotVerified */ __('Qty') ?></th>
  95. </tr>
  96. </thead>
  97. <tbody>
  98. <?php foreach ($block->getAddressItems($_address) as $_item): ?>
  99. <tr>
  100. <td class="col item" data-th="<?= $block->escapeHtml(__('Product Name')) ?>"><?= $block->getItemHtml($_item->getQuoteItem()) ?></td>
  101. <td class="col qty" data-th="<?= $block->escapeHtml(__('Qty')) ?>"><?= /* @escapeNotVerified */ $_item->getQty() ?></td>
  102. </tr>
  103. <?php endforeach; ?>
  104. </tbody>
  105. </table>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <?php endforeach; ?>
  112. <?= $block->getChildHtml('checkout_billing_items') ?>
  113. <div class="actions-toolbar">
  114. <div class="primary">
  115. <button class="action primary continue" type="submit"><span><?= /* @escapeNotVerified */ __('Continue to Billing Information') ?></span></button>
  116. </div>
  117. <div class="secondary">
  118. <a href="<?= /* @escapeNotVerified */ $block->getBackUrl() ?>" class="action back"><span><?= /* @escapeNotVerified */ __('Back to Select Addresses') ?></span></a>
  119. </div>
  120. </div>
  121. </form>