Skip to content

Commit 32f8ead

Browse files
committed
Don't add empty method to the cart summary
In some cases the method html is empty, this will result in an empty list item, which in the end results in an extra margin of 20px because of default styling.
1 parent 31c3293 commit 32f8ead

File tree

1 file changed

+2
-1
lines changed
  • app/code/Magento/Checkout/view/frontend/templates/cart

1 file changed

+2
-1
lines changed

app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
<?php $methods = $block->getMethods('methods') ?: $block->getMethods('top_methods') ?>
1515
<ul class="checkout methods items checkout-methods-items">
1616
<?php foreach ($methods as $method): ?>
17-
<?php if ($methodHtml = $block->getMethodHtml($method)): ?>
17+
<?php $methodHtml = $block->getMethodHtml($method); ?>
18+
<?php if (trim($methodHtml) !== ''): ?>
1819
<li class="item"><?= /* @escapeNotVerified */ $methodHtml ?></li>
1920
<?php endif; ?>
2021
<?php endforeach; ?>

0 commit comments

Comments
 (0)