Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
method.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
9 ?>
10 <div id="shipping-method-container">
11  <?php if ($block->getCanEditShippingMethod() || !$block->getCurrentShippingRate()): ?>
12  <?php if ($groups = $block->getShippingRateGroups()): ?>
13  <?php $currentRate = $block->getCurrentShippingRate(); ?>
14  <select name="shipping_method" id="shipping_method" class="required-entry">
15  <?php if (!$currentRate): ?>
16  <option value="">
17  <?= $block->escapeHtml(__('Please select a shipping method...')) ?>
18  </option>
19  <?php endif; ?>
20  <?php foreach ($groups as $code => $rates): ?>
21  <optgroup label="<?= $block->escapeHtml($block->getCarrierName($code)) ?>"
22  style="font-style:normal;">
23  <?php foreach ($rates as $rate): ?>
24  <option
25  value="<?= $block->escapeHtml($block->renderShippingRateValue($rate)) ?>"
26  <?= ($currentRate === $rate) ? ' selected="selected"' : '' ?>>
27  <?= /* @noEscape */ $block->renderShippingRateOption($rate) ?>
28  </option>
29  <?php endforeach; ?>
30  </optgroup>
31  <?php endforeach; ?>
32  </select>
33  <?php else: ?>
34  <p>
35  <strong>
36  <?= $block->escapeHtml(__('Sorry, no quotes are available for this order right now.')) ?>
37  </strong>
38  </p>
39  <?php endif; ?>
40  <?php else: ?>
41  <p>
42  <strong>
43  <?= /* @noEscape */ $block->renderShippingRateOption($block->getCurrentShippingRate()) ?>
44  </strong>
45  </p>
46  <?php endif; ?>
47 </div>
48 <div style="display: none" id="shipping_method_update">
49  <p><?= $block->escapeHtml(__('Please update order data to get shipping methods and rates')) ?></p>
50 </div>
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
__()
Definition: __.php:13
$rates
Definition: tax.phtml:35
$block
Definition: block.php:8
endif
Definition: 404.phtml:116
foreach( $groups as $code=> $rates)( $block->getCarrierName( $code)) ?>" style endforeach
Definition: method.phtml:27
$code
Definition: info.phtml:12