1

How do I remove the discount code from the cart ? There are loads of examples of how to remove it from the checkout but I also need to remove it from the cart.

5

app/design/frontend/{Vendor}/{theme}/Magento_Checkout/layout/checkout_cart_index.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="cart.discount" remove="true"/>
    </body>
</page>
  • 1
    I got '[ERROR] Failed to load the "Magento_GiftMessage/js/view/gift-message" component.' js error when use this code – himansu Oct 21 '18 at 17:03
  • On which version this solution have been tested? – Christophe Ferreboeuf Jul 10 '19 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.