Skip to content

Commit ada1c5f

Browse files
committed
Fixed configurable product widget issue
1 parent 1a805d0 commit ada1c5f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<div class="product-item-actions">
3434
<div class="actions-primary">
3535
<?php if ($_product->isSaleable()): ?>
36-
<?php if ($_product->getTypeInstance()->hasRequiredOptions($_product)): ?>
36+
<?php if (!$_item->getTypeInstance()->isPossibleBuyFromList($_item)): ?>
3737
<button type="button" title="<?= /* @escapeNotVerified */ __('Add to Cart') ?>"
3838
class="action tocart primary"
3939
data-mage-init='{"redirectUrl":{"url":"<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_product) ?>"}}'>

app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
6666
<?php if ($showCart): ?>
6767
<div class="actions-primary">
6868
<?php if ($_item->isSaleable()): ?>
69-
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
69+
<?php if (!$_item->getTypeInstance()->isPossibleBuyFromList($_item)): ?>
7070
<button class="action tocart primary"
7171
data-mage-init='{"redirectUrl":{"url":"<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}'
7272
type="button" title="<?= /* @escapeNotVerified */ __('Add to Cart') ?>">

app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
6565
<?php if ($showCart): ?>
6666
<div class="actions-primary">
6767
<?php if ($_item->isSaleable()): ?>
68-
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
68+
<?php if (!$_item->getTypeInstance()->isPossibleBuyFromList($_item)): ?>
6969
<button class="action tocart primary"
7070
data-mage-init='{"redirectUrl":{"url":"<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}'
7171
type="button" title="<?= /* @escapeNotVerified */ __('Add to Cart') ?>">

app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<?php if ($showCart): ?>
6262
<div class="actions-primary">
6363
<?php if ($_item->isSaleable()): ?>
64-
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
64+
<?php if (!$_item->getTypeInstance()->isPossibleBuyFromList($_item)): ?>
6565
<button class="action tocart primary" data-mage-init='{"redirectUrl":{"url":"<?= $block->escapeUrl($block->getAddToCartUrl($_item)) ?>"}}' type="button" title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
6666
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
6767
</button>

0 commit comments

Comments
 (0)