Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
tax.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php
12 $data = ['fptAttribute' => [
13  'region' => $this->helper('Magento\Framework\Json\Helper\Data')->jsonDecode(
14  $this->helper('Magento\Directory\Helper\Data')->getRegionJson()
15  ),
16  'itemsData' => $block->getValues(),
17  'bundlePriceType' => '#price_type',
18 ]];
19 ?>
20 <div id="attribute-<?= $block->getElement()->getHtmlId() ?>-container" class="field"
21  data-attribute-code="<?= $block->getElement()->getHtmlId() ?>"
22  data-mage-init="<?= $block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($data)) ?>">
23  <label class="label"><span><?= /* @escapeNotVerified */ $block->getElement()->getLabel() ?></span></label>
24 
25  <div class="control">
26  <table class="data-table">
27  <thead>
28  <tr>
29  <th class="col-website" <?php if (!$block->isMultiWebsites()): ?>style="display: none;"<?php endif; ?>><?= /* @escapeNotVerified */ __('Website') ?></th>
30  <th class="col-country required"><?= /* @escapeNotVerified */ __('Country/State') ?></th>
31  <th class="col-tax required"><?= /* @escapeNotVerified */ __('Tax') ?></th>
32  <th class="col-action"><?= /* @escapeNotVerified */ __('Action') ?></th>
33  </tr>
34  </thead>
35  <tfoot>
36  <tr>
37  <td colspan="4" class="col-actions-add"><?= $block->getAddButtonHtml() ?></td>
38  </tr>
39  </tfoot>
40  <tbody data-role="fpt-item-container" class="fpt-item-container">
41  </tbody>
42  </table>
43  <!--
44  Hidden field below with attribute code id is necessary for jQuery validation plugin.
45  Validation message will be displayed after this field.
46  -->
47  <input type="hidden" name="<?= $block->getElement()->getHtmlId() ?>" id="<?= $block->getElement()->getHtmlId() ?>" disabled="disabled">
48  </div>
49 
50  <script data-role="row-template" type="text/x-magento-template">
51  <tr id="<?= $block->getElement()->getHtmlId() ?>_weee_tax_row_<%- data.index %>" data-role="fpt-item-row">
52  <td class="col-website" <?php if (!$block->isMultiWebsites()): ?>style="display: none"<?php endif; ?>>
53  <select id="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>_weee_tax_row_<%- data.index %>_website"
54  name="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>[<%- data.index %>][website_id]"
55  class="<?= /* @escapeNotVerified */ $block->getElement()->getClass() ?> website required-entry" data-role="select-website">
56  <?php foreach ($block->getWebsites() as $_websiteId => $_info): ?>
57  <option value="<?= /* @escapeNotVerified */ $_websiteId ?>"><?= /* @escapeNotVerified */ $_info['name'] ?><?php if (!empty($_info['currency'])): ?>[<?= /* @escapeNotVerified */ $_info['currency'] ?>]<?php endif; ?></option>
58  <?php endforeach ?>
59  </select>
60  </td>
61  <td class="col-country">
62  <select id="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>_weee_tax_row_<%- data.index %>_country"
63  name="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>[<%- data.index %>][country]"
64  class="<?= /* @escapeNotVerified */ $block->getElement()->getClass() ?> country required-entry" data-role="select-country">
65  <?php foreach ($block->getCountries() as $_country): ?>
66  <option value="<?= /* @escapeNotVerified */ $_country['value'] ?>"><?= /* @escapeNotVerified */ htmlspecialchars($_country['label']) ?></option>
67  <?php endforeach ?>
68  </select>
69  <select id="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>_weee_tax_row_<%- data.index %>_state"
70  name="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>[<%- data.index %>][state]"
71  class="<?= /* @escapeNotVerified */ $block->getElement()->getClass() ?> state" disabled="" data-role="select-state">
72  <option value="0">*</option>
73  </select>
74  </td>
75  <td class="col-tax">
76  <input name="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>[<%- data.index %>][price]"
77  class="<?= /* @escapeNotVerified */ $block->getElement()->getClass() ?> required-entry validate-greater-than-zero"
78  type="text" value="<%- data.value %>"/>
79  </td>
80  <td class="col-action">
81  <input name="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>[<%- data.index %>][delete]" class="delete" type="hidden" value="" data-role="delete-fpt-item"/>
82  <?= $block->getChildHtml('delete_button') ?>
83  </td>
84  </tr>
85  </script>
86 </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
if( $form)() ?>< script > require(['jquery' mage mage
Definition: save.phtml:15
__()
Definition: __.php:13
$block
Definition: block.php:8
$data
Definition: tax.phtml:12
endforeach
Definition: tax.phtml:55
foreach( $rates as $rate)($isTop) endif
Definition: tax.phtml:38
jQuery('.store-switcher .dropdown-menu li a').each(function()
Definition: switcher.phtml:203