cancel
Showing results for 
Search instead for 
Did you mean: 

Remove billing information from one page checkout

Remove billing information from one page checkout

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

5 REPLIES 5

Re: Remove billing information from one page checkout

@romee

 

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.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Remove billing information from one page checkout

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.

 

Re: Remove billing information from one page checkout

Okay, Great Smiley Happy

 

I'll be happy to help you face any other issue.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Remove billing information from one page checkout

I am also facing some issues while removing billing, shipping and payment details in checkout. will you please share your code

Re: Remove billing information from one page checkout

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;
}