1

I want to use apply discount option on the checkout page. How can I show this?

  • you mean discount coupon code which is apply in cart page? – P_U Mar 22 '18 at 5:12
  • Coupon code form on checkout page. – Vinod Kumar Mar 22 '18 at 5:14
  • I think Magento 2 by default provides coupon code option in checkout page. – Kishan Patadia Mar 22 '18 at 5:43
2

In your custom theme folder you can add block by override checkout_index_index.xml.

Go to

/vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml

Paste it to

/app/design/frontend/[Vendor]/[Theme]/Magento_Checkout/layout/checkout_index_index.xml

Paste below code in body tag

<referenceContainer name="before.body.end">
    <block class="Magento\Checkout\Block\Cart\Coupon" name="checkout.cart.coupon" as="coupon" template="Magento_Checkout::cart/coupon.phtml" after="-"/>
</referenceContainer>  
0

call block in checkout_index_index.xml

<block class="Magento\Checkout\Block\Cart\Coupon" name="checkout.cart.coupon" as="coupon" template="cart/coupon.phtml"/>

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.