How to Add Additional Options in Magento 2

Magento 2 is a feature-rich platform that helps improve the shopping experience. However, many times it lacks in fulfilling the business requirements now that various types of business have its online presence. Luckily, the developers can offer customization to implement out of box functionalities.

As a part of such customization, you may want to add additional options in Magento 2 product page, cart page, etc. For example, you want to display a text box to allow customers to add comment box in the product page or to show installments selected by the customers on the cart page.

Also, it is important that you implement the customizations without affecting the core functionalities as it is not a good practice. The below method allows to add additional options in Magneto 2 considering it.

Steps to Add Additional Options in Magento 2:

  1. Create events.xml at app\code\Vendor\Extension\etc\
  2. Create CheckoutCartAddObserver.php at app\code\Vendor\Extension\Observer\
  3. Create AddOptionToOrderObserver.php at app\code\Vendor\Extension\Observer\

     

  4. For reorder override this controller Magento\Sales\Controller\AbstractController\Reorder and model

Share