At the controller checkout_cart_index
with the reference content
, I want to replace this:
<block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
With this:
<block type="multicoupon/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
What happens is instead of replacing the block, it adds a new one. I've spent hours looking into this to no avail. Is there a way to do this with my own module using just the layout or will I have to write the change to a different file?
Best Answer
Because unsetChild isn't working in this case, I suggest the nuclear option:
This will remove the block entirely. Not such a big deal because you'll immediately re-create it: