File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
app/code/Magento/PageBuilder/view/frontend/templates/catalog/product/widget/content Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ use Magento\Framework\App\Action\Action;
9
9
10
10
/** @var \Magento\CatalogWidget\Block\Product\ProductsList $block */
11
11
?>
12
+ <?php
13
+ /**
14
+ * Product carousel widget template
15
+ *
16
+ * @var \Magento\Framework\Escaper $escaper
17
+ */
18
+ ?>
12
19
<?php if ($ exist = ($ block ->getProductCollection () && $ block ->getProductCollection ()->getSize ())) : ?>
13
20
<?php
14
21
$ type = 'widget-product-carousel ' ;
@@ -93,6 +100,15 @@ use Magento\Framework\App\Action\Action;
93
100
</div>
94
101
</div>
95
102
<?= ($ iterator == count ($ items ) + 1 ) ? '</li> ' : '' ?>
103
+ <script type="text/x-magento-init">
104
+ {
105
+ "[data-role=tocart-form], .form.map.checkout": {
106
+ "catalogAddToCart": {
107
+ "product_sku": "<?= $ escaper ->escapeJs ($ _item ->getSku ()); ?> "
108
+ }
109
+ }
110
+ }
111
+ </script>
96
112
<?php endforeach ?>
97
113
</ol>
98
114
<?php endif ;?>
You can’t perform that action at this time.
0 commit comments