我试图替换默认的折扣块。不幸的是,块总是位于容器的底部。我无法将其移动到默认块位置。
我的 xml -
<?xml version="1.0"?>
<!--
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
<remove name="checkout.cart.coupon"/>
<referenceContainer name="cart.discount">
<block class="{namespace}\Coupons\Block\Coupon" name="checkout.cart.coupon2" as="sadasdasd" template="test.phtml"/>
</referenceContainer>
<move element="cart.discount" destination="checkout.cart.container" before="checkout.cart.order.actions.gift_options" />
</body>
</page>