Skip to content

Commit 70b70eb

Browse files
author
Ilan Parmentier
committed
Cart Empty container tag
The container checkout.cart.empty.widget is not a child of checkout.cart.empty, however it called directly from the template file in the first lines : <?php echo $block->getChildHtml('checkout_cart_empty_widget'); ?> in noItems.phtml : ```php <?php /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ /** @var $block \Magento\Checkout\Block\Cart */ ?> <div class="cart-empty"> <?php echo $block->getChildHtml('checkout_cart_empty_widget'); ?> ``` But you have this in your layout, checkout_cart_index.xml : ```xml <block class="Magento\Checkout\Block\Cart" name="checkout.cart.empty" before="-" template="cart/noItems.phtml"/> <container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/> ``` instead of ```xml <block class="Magento\Checkout\Block\Cart" name="checkout.cart.empty" before="-" template="cart/noItems.phtml"> <container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/> </block> ```
1 parent 3b6c497 commit 70b70eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@
180180
</block>
181181
</container>
182182
<container name="checkout.cart.noitems" as="no-items">
183-
<block class="Magento\Checkout\Block\Cart" name="checkout.cart.empty" before="-" template="cart/noItems.phtml"/>
184-
<container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/>
183+
<block class="Magento\Checkout\Block\Cart" name="checkout.cart.empty" before="-" template="cart/noItems.phtml">
184+
<container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/>
185+
</block>
185186
</container>
186187
</block>
187188
</referenceContainer>

0 commit comments

Comments
 (0)