- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Remove billing information from one page checkout
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.
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Remove billing information from one page checkout
Okay, Great
I'll be happy to help you face any other issue.
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
}