Skip to content

Commit d4ab99b

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1636 from magento-engcom/2.1-develop-prs
Public Pull Requests #11611 FR#6891_21 Add-to-cart checkbox still visible when = false [Backport 2.1 develop] by @mrodespin Fixed Public Issues #6891 Add-to-cart checkbox still visible when $canItemsAddToCart = false
2 parents 10c9144 + 7229193 commit d4ab99b

File tree

1 file changed

+2
-2
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/list

1 file changed

+2
-2
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ switch ($type = $block->getType()) {
203203
<?php echo $block->getReviewsSummaryHtml($_item, $templateType) ?>
204204
<?php endif; ?>
205205

206-
<?php if (!$_item->isComposite() && $_item->isSaleable() && $type == 'related'): ?>
206+
<?php if ($canItemsAddToCart && !$_item->isComposite() && $_item->isSaleable() && $type == 'related'): ?>
207207
<?php if (!$_item->getRequiredOptions()): ?>
208208
<div class="field choice related">
209209
<input type="checkbox" class="checkbox related" id="related-checkbox<?php /* @escapeNotVerified */ echo $_item->getId() ?>" name="related_products[]" value="<?php /* @escapeNotVerified */ echo $_item->getId() ?>" />
@@ -252,7 +252,7 @@ switch ($type = $block->getType()) {
252252
<?php endif; ?>
253253
</div>
254254
</div>
255-
<?php echo($iterator == count($items)+1) ? '</li>' : '' ?>
255+
<?php echo($iterator == count($items) + 1) ? '</li>' : '' ?>
256256
<?php endforeach ?>
257257
</ol>
258258
</div>

0 commit comments

Comments
 (0)