Inheritance: extends CheckoutComponent
 public function registerconfig()
 {
     $order = ShoppingCart::curr();
     //hack to make components work when there is no order
     if (!$order) {
         $order = Order::create();
     }
     $config = new CheckoutComponentConfig($order, false);
     $config->addComponent(CustomerDetailsCheckoutComponent::create());
     $config->addComponent(MembershipCheckoutComponent::create());
     return $config;
 }
 public function ContactDetailsForm()
 {
     $cart = ShoppingCart::curr();
     if (!$cart) {
         return false;
     }
     $config = new CheckoutComponentConfig(ShoppingCart::curr());
     $config->addComponent(CustomerDetailsCheckoutComponent::create());
     $form = CheckoutForm::create($this->owner, 'ContactDetailsForm', $config);
     $form->setRedirectLink($this->NextStepLink());
     $form->setActions(FieldList::create(FormAction::create("checkoutSubmit", _t('CheckoutStep.Continue', "Continue"))));
     $this->owner->extend('updateContactDetailsForm', $form);
     return $form;
 }
 public function __construct(Order $order)
 {
     parent::__construct($order);
     $this->addComponent(CustomerDetailsCheckoutComponent::create());
     $this->addComponent(ShippingAddressCheckoutComponent::create());
     $this->addComponent(BillingAddressCheckoutComponent::create());
     if (Checkout::member_creation_enabled() && !Member::currentUserID()) {
         $this->addComponent(MembershipCheckoutComponent::create());
     }
     if (count(GatewayInfo::getSupportedGateways()) > 1) {
         $this->addComponent(PaymentCheckoutComponent::create());
     }
     $this->addComponent(NotesCheckoutComponent::create());
     $this->addComponent(TermsCheckoutComponent::create());
 }