Skip to content

Commit 3a6adfb

Browse files
committed
ACP2E-1564: Page Builder: Adding Product to cart from PB Grid/Carousel doubles up the item quantity
1 parent 4e6dbf3 commit 3a6adfb

File tree

1 file changed

+6
-9
lines changed
  • app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content

1 file changed

+6
-9
lines changed

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@
66

77
use Magento\Framework\App\Action\Action;
88

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
169
/**
17-
* Product carousel widget template
18-
*
10+
* @var \Magento\CatalogWidget\Block\Product\ProductsList $block
1911
* @var \Magento\Framework\Escaper $escaper
2012
*/
13+
14+
// phpcs:disable Generic.Files.LineLength.TooLong
15+
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
2116
?>
2217

2318
<?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())): ?>
@@ -85,6 +80,7 @@ use Magento\Framework\App\Action\Action;
8580
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
8681
</button>
8782
</form>
83+
<?php if($block->getBlockHtml('formkey')): ?>
8884
<script type="text/x-magento-init">
8985
{
9086
"[data-role=tocart-form], .form.map.checkout": {
@@ -94,6 +90,7 @@ use Magento\Framework\App\Action\Action;
9490
}
9591
}
9692
</script>
93+
<?php endif;?>
9794
<?php else: ?>
9895
<?php if ($_item->isAvailable()): ?>
9996
<div class="stock available"><span><?= $block->escapeHtml(__('In stock')) ?></span></div>

0 commit comments

Comments
 (0)