I am new to Magento2 I know this question might sound stupid to someone. But I am struggling to work on magento2. I am working on adding additional field in shipping and billing form in checkout. However, I have added field in layout but following a tutorial but I want to save the value in database also. Like if shipping and billing address are not same then after filling details in billing form then after clicking on update button the additional field value should be seen in details container in same checkout form. So please guide me as much as you can like how to find the class to override on update button and adding my custom field value in container, also saving in database. I do not want ready made code, I want guidance.
Thanks in advance
- You can rely on the button click event to call updateAddress method. Here you can update the additional field value.
- You should pass additional field value before submitting place order
- When you click place order you can catch the checkout_onepage_controller_success_action event and save the additional field to the sales_order_address table
Check this Link ,it will help you to override the existing class in the magento