I am changing shopping cart to the enquiry cart so I don't need billing shipping and payment information. I found way to remove shipping and payment but having hard time to remove billing info. Does anybody know how to do this?
Thanks
For this you can try disabling the Billing address using CSS. If the Billing address is required field then you can assign some default address and can work out this way.
Thank you I make it work by hidding the billing using css and adding the event on onepage.phtml to make the billing continue button click.
Doing so it solved my issue.
Okay, Great
I'll be happy to help you face any other issue.
I am also facing some issues while removing billing, shipping and payment details in checkout. will you please share your code
public function afterProcess(\Magento\Checkout\Block\Checkout\LayoutProcessor $subject, array $jsLayout) {
$billingConfiguration = &$jsLayout['components']['checkout']['children']['steps']['children']['billing-step']
['children']['payment']['children']['payments-list']['children'];
//Checks if billing step available.
if (isset($billingConfiguration)) {
//Iterate over billing forms.
foreach($billingConfiguration as $key => &$billingForm) {
//Exclude not billing forms
if (!strpos($key, '-form')) {
continue;
}
/* $billingForm['children']['form-fields']['children']['company']['visible'] = 0;
$billingForm['children']['form-fields']['children']['city']['visible'] = 0;
$billingForm['children']['form-fields']['children']['city']['validation']['required-entry'] = 0;
$billingForm['children']['form-fields']['children']['region']['visible'] = 0;
$billingForm['children']['form-fields']['children']['region_id']['visible'] = 0;
$billingForm['children']['form-fields']['children']['telephone']['visible'] = 0;
$billingForm['children']['form-fields']['children']['telephone']['value'] = '0000000000';
$billingForm['children']['form-fields']['children']['telephone']['validation']['required-entry'] = 0;
$billingForm['children']['form-fields']['children']['country_id']['visible'] = 0;
$billingForm['children']['form-fields']['children']['country_id']['validation']['required-entry'] = 0; */
unset($billingForm['children']['form-fields']['children']['company']);
unset($billingForm['children']['form-fields']['children']['city']);
unset($billingForm['children']['form-fields']['children']['region']);
unset($billingForm['children']['form-fields']['children']['region_id']);
unset($billingForm['children']['form-fields']['children']['telephone']);
unset($billingForm['children']['form-fields']['children']['street']);
unset($billingForm['children']['form-fields']['children']['country_id']);
//unset($billingForm['children']['form-fields']['children']['postcode']);
//print_r($billingForm['children']['form-fields']); die;
}
}
return $jsLayout;
}