Discussions

How to remove billing information from checkout page?

Hi, I'm trying to set up a store selling downloadable files. The only information I need from customers is their e-mail address and payment, so I'd like to remove the name and address requirement from the checkout page. Changing billing information to hidden in the order display settings doesn't seem to have any effect. Can anyone help?

Posted: Jan 12, 2012

Comments

scottml on January 12, 2012

Sorry, I don't know how I missed this. I got this done by going to configure store -> checkout settings. Under the checkout section of the checkout settings page, drag "Billing information" to the disabled section.

spacereactor on May 31, 2012

you can hid it from checkout but it will still be if you edit the order. Anyway to fully remove billing information? Does delete away the whole bill information field affect drupal commerce?

dannymacom dannymacom on June 6, 2012

You might try using a hook like the one below

function hook_commerce_checkout_pane_info_alter(&$checkout_pane) {
  global $user;

  foreach ($checkout_pane as $pane_name => & $pane_data) {
    if ($pane_name == 'customer_profile_shipping') {
      $order = commerce_cart_order_load($user->uid);
                // dpm($order);
        if (!empty($order->data)){
              //my personal logic, you can ignore this
              if ($order->data['self']['Gift'] == '1' && $order->data['self']['Gift_AddSelfCheckout'] == '0'){
                 
                  $order_wrapper = entity_metadata_wrapper('commerce_order', $order);
                      // dpm($order_wrapper);
                  $lines = $order_wrapper->commerce_line_items->value();
                      // dpm($lines);
              
                  unset($checkout_pane['customer_profile_shipping']);
           }
     }
   }
}
}
drupalcommerce Check out the #Drupal Commerce 2.x Roadmap to see where you can get involved: http://t.co/WAc3jmXY2a
drupalcommerce A new blog discussing the new showcase listing http://t.co/FHOzhAg3tl http://t.co/J5C87imjhb
drupalcommerce RT @drupalcon: Thanks @CommerceGuys and @CommerceJohn for your support, and for #CommerceKickstart! Take the tour http://t.co/ivKEYH7k0o
drupalcommerce Updating our extensions directory: 665 new or updated modules, distributions, sandboxes, & themes. http://t.co/6NMMofYo12 #weloveyouguys