public function ConfirmationForm() { $config = new CheckoutComponentConfig(ShoppingCart::curr(), false); $config->addComponent(NotesCheckoutComponent::create()); $config->addComponent(TermsCheckoutComponent::create()); $this->owner->extend('updateConfirmationComponentConfig', $config); $form = PaymentForm::create($this->owner, "ConfirmationForm", $config); $form->setFailureLink($this->owner->Link('summary')); $this->owner->extend('updateConfirmationForm', $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()); }