Ecommerce is not as easy as it may seem. Online retailers need to take care of a lot of things, often simultaneously. From finding a winning product to listing and optimization, from sourcing and logistics to customer service, and from quality control to payment handling, every step requires due diligence.
But more than anything else, eCommerce business owners need to find ways to increase their sales. They need to make sure their business does not stagnate or go down. This includes running marketing campaigns and on-site promotions and deals.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, easter, or holiday campaigns.
Discount codes encourage customers to buy from a website to avail themselves discounts. 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 and are a great way to increase customer acquisition and meet sales goals..checkout-index-index .payment-option._collapsible.opc-payment-additional.discount-code { display: none; }
And enter the following codeapp/design/frontend/VENDOR/THEME/Magento_Checkout/layout/checkout_index_index.xml
Now apply the following commands to flush the cache.<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="checkout.root"> <arguments> <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> </item> </item> </item> </item> </item> </item> </item> </item> </item> </item> </item> </item> </item> </argument> </arguments> </referenceBlock> </body>
This will cause the code to take effect and the 'Apply Discount' option will be removed from the checkout page.php bin/magento cache:clean php bin/magento cache:flush
That’s all for this post. Should you have any questions, don’t hesitate to contact our Magento 2 experts.
Related Articles: