File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,7 @@ use Magento\Framework\App\Action\Action;
72
72
<?= $ block ->getBlockHtml ('formkey ' ) ?>
73
73
<button type="submit"
74
74
title="<?= $ block ->escapeHtml (__ ('Add to Cart ' )) ?> "
75
- class="action tocart primary"
76
- disabled>
75
+ class="action tocart primary">
77
76
<span><?= $ block ->escapeHtml (__ ('Add to Cart ' )) ?> </span>
78
77
</button>
79
78
</form>
@@ -114,11 +113,13 @@ use Magento\Framework\App\Action\Action;
114
113
<?= $ block ->getPagerHtml () ?>
115
114
</div>
116
115
</div>
117
- <script type="text/x-magento-init">
118
- {
119
- ".block.widget [data-role=tocart-form]": {
120
- "Magento_Catalog/js/validate-product": {}
116
+ <?php if ($ block ->getBlockHtml ('formkey ' )): ?>
117
+ <script type="text/x-magento-init">
118
+ {
119
+ ".block.widget [data-role=tocart-form]": {
120
+ "Magento_Catalog/js/validate-product": {}
121
+ }
121
122
}
122
- }
123
- </script >
123
+ </script>
124
+ <?php endif ; ? >
124
125
<?php endif ;?>
You can’t perform that action at this time.
0 commit comments