File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
app/code/Magento/Catalog/view/frontend/templates/product Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ $_helper = $block->getData('outputHelper');
86
86
<form data-role="tocart-form"
87
87
data-product-sku="<?= $ escaper ->escapeHtml ($ _product ->getSku ()) ?> "
88
88
action="<?= $ escaper ->escapeUrl ($ postParams ['action ' ]) ?> "
89
+ data-mage-init='{"catalogAddToCart": {}}'
89
90
method="post">
90
91
<?php $ options = $ block ->getData ('viewModel ' )->getOptionsData ($ _product ); ?>
91
92
<?php foreach ($ options as $ optionItem ): ?>
@@ -161,13 +162,4 @@ $_helper = $block->getData('outputHelper');
161
162
</div>
162
163
<?= $ block ->getChildBlock ('toolbar ' )->setIsBottom (true )->toHtml () ?>
163
164
<?php // phpcs:ignore Magento2.Legacy.PhtmlTemplate ?>
164
- <script type="text/x-magento-init">
165
- {
166
- "[data-role=tocart-form], .form.map.checkout": {
167
- "catalogAddToCart": {
168
- "product_sku": "<?= $ escaper ->escapeJs ($ _product ->getSku ()) ?> "
169
- }
170
- }
171
- }
172
- </script>
173
165
<?php endif ; ?>
You can’t perform that action at this time.
0 commit comments