File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 6
6
7
7
use Magento \Framework \App \Action \Action ;
8
8
9
- /** @var \Magento\CatalogWidget\Block\Product\ProductsList $block */
10
-
11
- // phpcs:disable Generic.Files.LineLength.TooLong
12
- // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
13
- ?>
14
-
15
- <?php
16
9
/**
17
- * Product carousel widget template
18
- *
10
+ * @var \Magento\CatalogWidget\Block\Product\ProductsList $block
19
11
* @var \Magento\Framework\Escaper $escaper
20
12
*/
13
+
14
+ // phpcs:disable Generic.Files.LineLength.TooLong
15
+ // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
21
16
?>
22
17
23
18
<?php if ($ exist = ($ block ->getProductCollection () && $ block ->getProductCollection ()->getSize ())): ?>
@@ -85,6 +80,7 @@ use Magento\Framework\App\Action\Action;
85
80
<span><?= $ block ->escapeHtml (__ ('Add to Cart ' )) ?> </span>
86
81
</button>
87
82
</form>
83
+ <?php if ($ block ->getBlockHtml ('formkey ' )): ?>
88
84
<script type="text/x-magento-init">
89
85
{
90
86
"[data-role=tocart-form], .form.map.checkout": {
@@ -94,6 +90,7 @@ use Magento\Framework\App\Action\Action;
94
90
}
95
91
}
96
92
</script>
93
+ <?php endif ;?>
97
94
<?php else : ?>
98
95
<?php if ($ _item ->isAvailable ()): ?>
99
96
<div class="stock available"><span><?= $ block ->escapeHtml (__ ('In stock ' )) ?> </span></div>
You can’t perform that action at this time.
0 commit comments