cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Custom field to Estimate Shipping And Tax block in cart page

Adding Custom field to Estimate Shipping And Tax block in cart page

I would like to add custom radio field in the Estimate Shipping and Tax block. I was able to add the input field but I'm not sure how to handle form submit or estimate-shipping-methods API. Currently I'm getting below error:

Spoiler
Message: Property "TypeOfAddress" does not have accessor method "getTypeOfAddress" in class "Magento\Quote\Api\Data\AddressInterface". {"exception":"[object] (Exception(code: 0): Report ID: webapi-5f6b509995f80; Message: Property \"TypeOfAddress\" does not have accessor method \"getTypeOfAddress\" in class "Magento\\Quote\\Api\\Data\\AddressInterface\". at

Could someone help how to process the extension attribute for Estimate Shipping and Tax block

 

References:
1. https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout_new_field.html
2. https://magento.stackexchange.com/questions/135969/magento-2-how-to-add-a-custom-field-to-checkout-a...

 

Mockup of my current implementation:

1. https://nimb.ws/mryuOv