I have a very custom use for Magento and I'm trying to remove street address from the checkout. Currently I have:
class LayoutProcessor { /** * @param \Magento\Checkout\Block\Checkout\LayoutProcessor $subject * @param array $jsLayout * @return array */ public function afterProcess( \Magento\Checkout\Block\Checkout\LayoutProcessor $subject, array $jsLayout ) { $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children'] ['shippingAddress']['children']['shipping-address-fieldset']['children']['street'] = [ 'component' => 'Magento_Ui/js/form/components/group', 'required' => false, 'dataScope' => 'shippingAddress.street', 'provider' => 'checkoutProvider', 'sortOrder' => 1005, 'type' => 'group' ]; return $jsLayout; } } Unfortunately, while this seems to have removed the street address and stopped it from being required when entering shipping address, once I continue to the Review & Payment page and press "Place Order" it provides the following error, stopping me from proceeding:
Please check the shipping address information. street is a required field.
How can I stop this check and allow it to proceed?
This solution suggests that I can remove the required aspect of fields with jquery, but where would I put this js file and get magento to load it on the Review and Payment page?