Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
form.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?>
12 <?= $block->getChildHtml('form_before') ?>
13 <form action="<?= /* @escapeNotVerified */ $block->getUrl('checkout/cart/updatePost') ?>"
14  method="post"
15  id="form-validate"
16  data-mage-init='{"Magento_Checkout/js/action/update-shopping-cart":
17  {"validationURL" : "/checkout/cart/updateItemQty"}
18  }'
19  class="form form-cart">
20  <?= $block->getBlockHtml('formkey') ?>
21  <div class="cart table-wrapper<?= $mergedCells == 2 ? ' detailed' : '' ?>">
22  <?php if ($block->getPagerHtml()): ?>
23  <div class="cart-products-toolbar cart-products-toolbar-top toolbar" data-attribute="cart-products-toolbar-top"><?= $block->getPagerHtml() ?></div>
24  <?php endif ?>
25  <table id="shopping-cart-table"
26  class="cart items data table"
27  data-mage-init='{"shoppingCart":{"emptyCartButton": "action.clear",
28  "updateCartActionContainer": "#update_cart_action_container"}}'>
29  <caption role="heading" aria-level="2" class="table-caption"><?= /* @escapeNotVerified */ __('Shopping Cart Items') ?></caption>
30  <thead>
31  <tr>
32  <th class="col item" scope="col"><span><?= /* @escapeNotVerified */ __('Item') ?></span></th>
33  <th class="col price" scope="col"><span><?= /* @escapeNotVerified */ __('Price') ?></span></th>
34  <th class="col qty" scope="col"><span><?= /* @escapeNotVerified */ __('Qty') ?></span></th>
35  <th class="col subtotal" scope="col"><span><?= /* @escapeNotVerified */ __('Subtotal') ?></span></th>
36  </tr>
37  </thead>
38  <?php foreach ($block->getItems() as $_item): ?>
39  <?= $block->getItemHtml($_item) ?>
40  <?php endforeach ?>
41  </table>
42  <?php if ($block->getPagerHtml()): ?>
43  <div class="cart-products-toolbar cart-products-toolbar-bottom toolbar" data-attribute="cart-products-toolbar-bottom"><?= $block->getPagerHtml() ?></div>
44  <?php endif ?>
45  </div>
46  <div class="cart main actions">
47  <?php if ($block->getContinueShoppingUrl()): ?>
48  <a class="action continue"
49  href="<?= $block->escapeUrl($block->getContinueShoppingUrl()) ?>"
50  title="<?= $block->escapeHtml(__('Continue Shopping')) ?>">
51  <span><?= /* @escapeNotVerified */ __('Continue Shopping') ?></span>
52  </a>
53  <?php endif; ?>
54  <button type="submit"
55  name="update_cart_action"
56  data-cart-empty=""
57  value="empty_cart"
58  title="<?= $block->escapeHtml(__('Clear Shopping Cart')) ?>"
59  class="action clear" id="empty_cart_button">
60  <span><?= /* @escapeNotVerified */ __('Clear Shopping Cart') ?></span>
61  </button>
62  <button type="submit"
63  name="update_cart_action"
64  data-cart-item-update=""
65  value="update_qty"
66  title="<?= $block->escapeHtml(__('Update Shopping Cart')) ?>"
67  class="action update">
68  <span><?= /* @escapeNotVerified */ __('Update Shopping Cart') ?></span>
69  </button>
70  <input type="hidden" value="" id="update_cart_action_container" data-cart-item-update=""/>
71  </div>
72 </form>
73 <?= $block->getChildHtml('checkout.cart.order.actions') ?>
74 <?= $block->getChildHtml('shopping.cart.table.after') ?>
75 
$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
endforeach
Definition: form.phtml:122
endif
Definition: form.phtml:34
if( $form)() ?>< script > require(['jquery' mage mage
Definition: save.phtml:15
__()
Definition: __.php:13
$mergedCells
Definition: form.phtml:11
jquery extjs ext tree mage adminhtml form
Definition: tree.phtml:41
$block
Definition: block.php:8
$_item
Definition: default.phtml:11