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;
7272 <?= $ block ->getBlockHtml ('formkey ' ) ?>
7373 <button type="submit"
7474 title="<?= $ block ->escapeHtml (__ ('Add to Cart ' )) ?> "
75- class="action tocart primary"
76- disabled>
75+ class="action tocart primary">
7776 <span><?= $ block ->escapeHtml (__ ('Add to Cart ' )) ?> </span>
7877 </button>
7978 </form>
@@ -114,11 +113,13 @@ use Magento\Framework\App\Action\Action;
114113 <?= $ block ->getPagerHtml () ?>
115114 </div>
116115 </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+ }
121122 }
122- }
123- </script >
123+ </script>
124+ <?php endif ; ? >
124125<?php endif ;?>
You can’t perform that action at this time.
0 commit comments