Skip to content

Commit 0c74bd2

Browse files
author
Oleksii Korshenko
committed
MAGETWO-82756: FR#6891_21 Add-to-cart checkbox still visible when = false [Backport 2.1 develop] #11611
- Merge Pull Request #11611 from mrodespin/magento2:FR#6891_21 - Merged commits: 1. 5987993
2 parents 619ac30 + 5987993 commit 0c74bd2

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)