Magento 2E-CommerceHow To GuideMay 10, 2024Simon Walker

Magento 2: How to Remove "Apply Discount Code" From Checkout?

Magento 2: How to Remove "Apply Discount Code" From Checkout?

With the ever-increasing number of eCommerce stores, one may think that they offer an easy way to financial stability. However, what people fail to realise is that with an increase in the number of online stores, it becomes increasingly difficult to retain one’s market share let alone increase it.

As a leading Magento development company, store owners ask us for help with devising strategies to increase and retain customers. Unfortunately, there is no hard and fixed rule as various factors must be considered. Recommending a one size fits all strategy is a recipe for disaster.

However, one strategy that may prove beneficial for all is to remove the apply discount code option from checkout in Magento 2. You may be thinking that removing discounts is probably the worst possible decision. After all, who doesn’t love to save money? Well, as we will discuss later, removing them is actually a good strategy.

What Are Discount Codes and How Are They Helpful?

Discount codes are usually a combination of numbers and letters that make customers eligible for discounts on individual items or the entire order. Customers enter the code during the checkout process to redeem a specific offer. Discount codes are used as an on-site marketing strategy on special occasions such as Christmas.

Discount codes encourage customers to buy from a website and save money in the process. They benefit both customers and businesses. Customers buy the product they want for a lower price and the store generates revenue. Discount codes work well for both new and returning customers, proving highly effective in meeting sales goals.

So, the question is, why would you want to remove them?

Why Would You Want to Remove ‘Apply Discount Code’ From Your Magento 2 Store?

Streamlined Checkout

The below statistics provide valuable insights related to cart abandonment.


Source: Statista

The above image shows the average global cart abandonment rate. It shows that with the increase in eCommerce stores, customers have more choice than before. Therefore, they take longer to complete their purchases. They may add a product to the cart but abandon it altogether. They may think they can get a better deal elsewhere.

When you have an ‘Apply Discount Code’ option, customers start looking for ways to get their hands on the discount. Thus, they don’t complete the purchase until they find the discount or can the product at a discount from another store. By removing the discount code option, customers think that this is the actual price.

It prevents overthinking and compels them to complete the purchase instantly. Many of our clients have reported reduced cart abandonment rates because of removing the discount code option altogether. It doesn’t mean they have stopped offering discounts. Instead, they just use other methods.

Brand Perception

Did you notice that certain brands don’t offer discounts at all because undermines their brand perception. For example, Apple rarely offers discounts. Similarly, luxury brands such as Loius Vuitton or Hermes don’t offer discounts either. Likewise, your store might have an exclusive brand perception. Offering regular or hefty discounts can undermine this sense of exclusivity.

Promote Product Value

Offering discounts can devalue your products. Customers will stop seeing the product’s true value and focus on the monetary aspect alone. This can impact your sales. By removing discounts, you compel the audience to evaluate the product based on what it has to offer rather than the price alone.

Best Practices for Discount Codes

While promotional codes have the potential to increase sales, they can also damage your profits. They can also have a negative impact on your brand. So before issuing discount codes, make sure they are well thought out. Keep the following points in mind when using discount codes in your store.

  • The discount strategy should be aligned with your brand.
  • Don’t complicate the discount promo.
  • Don’t offer hefty discounts.
  • Target the right customers.

You also may want to remove or disable the discount code option after a specific period of time or for a particular customer group.

How To Remove ‘Apply Discount Code’ From Checkout in Magento 2?

By default, the ‘Apply Discount Code’ option is displayed on the payment step at the end of payment methods. There is no option to remove or disable this option from the backend configuration. However, we can remove apply discount code option programmatically. Following are the two methods to get this done.

Method 1: Using the CSS File

Enter the following code in your custom CSS file.

    display: none;

Method 2: Using the XML File

Navigate to the following path

And enter the following code
<page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <referenceBlock name="checkout.root">
   <argument name="jsLayout" xsi:type="array">
    <item name="components" xsi:type="array">
     <item name="checkout" xsi:type="array">
      <item name="children" xsi:type="array">
       <item name="steps" xsi:type="array">
        <item name="children" xsi:type="array">
         <item name="billing-step" xsi:type="array">
          <item name="children" xsi:type="array">
           <item name="payment" xsi:type="array">
            <item name="children" xsi:type="array">
             <item name="afterMethods" xsi:type="array">
              <item name="children" xsi:type="array"> 
               <item name="discount" xsi:type="array">
                <item name="config" xsi:type="array">
                 <item name="componentDisabled" xsi:type="boolean">true</item>
Now apply the following commands to flush the cache.
php bin/magento cache:clean
php bin/magento cache:flush

This will cause the code to take effect and the 'Apply Discount' option will be removed from the checkout page.

Final Thoughts on Removing Apply Discount Code from Checkout in Magento 2

That’s all for this post. Should you have any questions, don’t hesitate to contact our Magento 2 experts.

Related Articles: