|
10 | 10 | ?> |
11 | 11 | <?php $mergedCells = ($this->helper(Magento\Tax\Helper\Data::class)->displayCartBothPrices() ? 2 : 1); ?> |
12 | 12 | <?= $block->getChildHtml('form_before') ?> |
13 | | -<form action="<?= $block->escapeUrl($block->getUrl('checkout/cart/updatePost')) ?>" |
| 13 | + <form action="<?= $escaper->escapeUrl($block->getUrl('checkout/cart/updatePost')) ?>" |
14 | 14 | method="post" |
15 | 15 | id="form-validate" |
16 | 16 | data-mage-init='{"Magento_Checkout/js/action/update-shopping-cart": |
17 | | - {"validationURL" : "<?= $block->escapeUrl($block->getUrl('checkout/cart/updateItemQty')) ?>", |
18 | | - "updateCartActionContainer": "#update_cart_action_container"} |
| 17 | + {"validationURL" : "<?= $escaper->escapeUrl($block->getUrl('checkout/cart/updateItemQty')) ?>", |
| 18 | + "updateCartActionContainer": "#update_cart_action_container"}, |
| 19 | + "Magento_Checkout/js/cart/ensure-subtotal-sync": {} |
19 | 20 | }' |
20 | 21 | class="form form-cart"> |
21 | | - <?= $block->getBlockHtml('formkey') ?> |
22 | | - <div class="cart table-wrapper<?= $mergedCells == 2 ? ' detailed' : '' ?>"> |
23 | | - <?php if ($block->getPagerHtml()): ?> |
24 | | - <div class="cart-products-toolbar cart-products-toolbar-top toolbar" |
25 | | - data-attribute="cart-products-toolbar-top"><?= $block->getPagerHtml() ?> |
26 | | - </div> |
27 | | - <?php endif ?> |
28 | | - <table id="shopping-cart-table" |
29 | | - class="cart items data table" |
30 | | - data-mage-init='{"shoppingCart":{"emptyCartButton": ".action.clear", |
| 22 | + <?= $block->getBlockHtml('formkey') ?> |
| 23 | + <div class="cart table-wrapper<?= $mergedCells == 2 ? ' detailed' : '' ?>"> |
| 24 | + <?php if ($block->getPagerHtml()): ?> |
| 25 | + <div class="cart-products-toolbar cart-products-toolbar-top toolbar" |
| 26 | + data-attribute="cart-products-toolbar-top"><?= $block->getPagerHtml() ?> |
| 27 | + </div> |
| 28 | + <?php endif ?> |
| 29 | + <table id="shopping-cart-table" |
| 30 | + class="cart items data table" |
| 31 | + data-mage-init='{"shoppingCart":{"emptyCartButton": ".action.clear", |
31 | 32 | "updateCartActionContainer": "#update_cart_action_container"}}'> |
32 | | - <caption class="table-caption"><?= $block->escapeHtml(__('Shopping Cart Items')) ?></caption> |
33 | | - <thead> |
| 33 | + <caption class="table-caption"><?= $escaper->escapeHtml(__('Shopping Cart Items')) ?></caption> |
| 34 | + <thead> |
34 | 35 | <tr> |
35 | | - <th class="col item" scope="col"><span><?= $block->escapeHtml(__('Item')) ?></span></th> |
36 | | - <th class="col price" scope="col"><span><?= $block->escapeHtml(__('Price')) ?></span></th> |
37 | | - <th class="col qty" scope="col"><span><?= $block->escapeHtml(__('Qty')) ?></span></th> |
38 | | - <th class="col subtotal" scope="col"><span><?= $block->escapeHtml(__('Subtotal')) ?></span></th> |
| 36 | + <th class="col item" scope="col"><span><?= $escaper->escapeHtml(__('Item')) ?></span></th> |
| 37 | + <th class="col price" scope="col"><span><?= $escaper->escapeHtml(__('Price')) ?></span></th> |
| 38 | + <th class="col qty" scope="col"><span><?= $escaper->escapeHtml(__('Qty')) ?></span></th> |
| 39 | + <th class="col subtotal" scope="col"><span><?= $escaper->escapeHtml(__('Subtotal')) ?></span></th> |
39 | 40 | </tr> |
40 | | - </thead> |
41 | | - <?php foreach ($block->getItems() as $_item): ?> |
42 | | - <?= $block->getItemHtml($_item) ?> |
43 | | - <?php endforeach ?> |
44 | | - </table> |
45 | | - <?php if ($block->getPagerHtml()): ?> |
46 | | - <div class="cart-products-toolbar cart-products-toolbar-bottom toolbar" |
47 | | - data-attribute="cart-products-toolbar-bottom"><?= $block->getPagerHtml() ?> |
48 | | - </div> |
49 | | - <?php endif ?> |
50 | | - </div> |
51 | | - <div class="cart main actions"> |
52 | | - <?php if ($block->getContinueShoppingUrl()): ?> |
53 | | - <a class="action continue" |
54 | | - href="<?= $block->escapeUrl($block->getContinueShoppingUrl()) ?>" |
55 | | - title="<?= $block->escapeHtml(__('Continue Shopping')) ?>"> |
56 | | - <span><?= $block->escapeHtml(__('Continue Shopping')) ?></span> |
57 | | - </a> |
58 | | - <?php endif; ?> |
59 | | - <?php if ($block->getViewModel()->isClearShoppingCartEnabled()): ?> |
60 | | - <button type="button" |
| 41 | + </thead> |
| 42 | + <?php foreach ($block->getItems() as $_item): ?> |
| 43 | + <?= $block->getItemHtml($_item) ?> |
| 44 | + <?php endforeach ?> |
| 45 | + </table> |
| 46 | + <?php if ($block->getPagerHtml()): ?> |
| 47 | + <div class="cart-products-toolbar cart-products-toolbar-bottom toolbar" |
| 48 | + data-attribute="cart-products-toolbar-bottom"><?= $block->getPagerHtml() ?> |
| 49 | + </div> |
| 50 | + <?php endif ?> |
| 51 | + </div> |
| 52 | + <div class="cart main actions"> |
| 53 | + <?php if ($block->getContinueShoppingUrl()): ?> |
| 54 | + <a class="action continue" |
| 55 | + href="<?= $escaper->escapeUrl($block->getContinueShoppingUrl()) ?>" |
| 56 | + title="<?= $escaper->escapeHtml(__('Continue Shopping')) ?>"> |
| 57 | + <span><?= $escaper->escapeHtml(__('Continue Shopping')) ?></span> |
| 58 | + </a> |
| 59 | + <?php endif; ?> |
| 60 | + <?php if ($block->getViewModel()->isClearShoppingCartEnabled()): ?> |
| 61 | + <button type="button" |
| 62 | + name="update_cart_action" |
| 63 | + data-cart-empty="" |
| 64 | + value="empty_cart" |
| 65 | + title="<?= $escaper->escapeHtml(__('Clear Shopping Cart')) ?>" |
| 66 | + class="action clear" id="empty_cart_button"> |
| 67 | + <span><?= $escaper->escapeHtml(__('Clear Shopping Cart')) ?></span> |
| 68 | + </button> |
| 69 | + <?php endif ?> |
| 70 | + <button type="submit" |
61 | 71 | name="update_cart_action" |
62 | | - data-cart-empty="" |
63 | | - value="empty_cart" |
64 | | - title="<?= $block->escapeHtml(__('Clear Shopping Cart')) ?>" |
65 | | - class="action clear" id="empty_cart_button"> |
66 | | - <span><?= $block->escapeHtml(__('Clear Shopping Cart')) ?></span> |
| 72 | + data-cart-item-update="" |
| 73 | + value="update_qty" |
| 74 | + title="<?= $escaper->escapeHtml(__('Update Shopping Cart')) ?>" |
| 75 | + class="action update"> |
| 76 | + <span><?= $escaper->escapeHtml(__('Update Shopping Cart')) ?></span> |
67 | 77 | </button> |
68 | | - <?php endif ?> |
69 | | - <button type="submit" |
70 | | - name="update_cart_action" |
71 | | - data-cart-item-update="" |
72 | | - value="update_qty" |
73 | | - title="<?= $block->escapeHtml(__('Update Shopping Cart')) ?>" |
74 | | - class="action update"> |
75 | | - <span><?= $block->escapeHtml(__('Update Shopping Cart')) ?></span> |
76 | | - </button> |
77 | | - <input type="hidden" value="" id="update_cart_action_container" data-cart-item-update=""/> |
78 | | - </div> |
79 | | -</form> |
| 78 | + <input type="hidden" value="" id="update_cart_action_container" data-cart-item-update=""/> |
| 79 | + </div> |
| 80 | + </form> |
80 | 81 | <?= $block->getChildHtml('checkout.cart.order.actions') ?> |
81 | 82 | <?= $block->getChildHtml('shopping.cart.table.after') ?> |
0 commit comments