/** * Process the current step * * @return void * * @author Sascha Koehler <*****@*****.**> * @copyright 2011 pixeltricks GmbH * @since 06.04.2011 */ public function process() { if (!parent::process()) { return $this->renderWith('SilvercartCheckoutFormStepPaymentError'); } $this->controller->addCompletedStep(); $this->controller->NextStep(); }
/** * Here we set some preferences. * * @return void * * @author Sebastian Diel <*****@*****.**>, * Sascha Koehler <*****@*****.**> * @since 08.07.2014 */ public function preferences() { parent::preferences(); $this->preferences['stepIsVisible'] = true; $this->preferences['stepTitle'] = _t('SilvercartCheckoutFormStep5.TITLE', 'Overview'); $this->preferences['submitButtonTitle'] = _t('SilvercartCheckoutFormStep.ORDER_NOW', 'Order now'); $this->preferences['fillInRequestValues'] = true; $this->preferences['createShoppingcartForms'] = false; $this->preferences['submitButtonUseButtonTag'] = true; $this->preferences['submitButtonExtraClasses'] = array('silvercart-button', 'btn', 'btn-success', 'pull-right'); $checkoutData = $this->controller->getCombinedStepData(); if (isset($checkoutData['PaymentMethod'])) { $this->paymentMethodObj = DataObject::get_by_id('SilvercartPaymentMethod', $checkoutData['PaymentMethod']); if ($this->paymentMethodObj && $this->paymentMethodObj->hasMethod('getOrderConfirmationSubmitButtonTitle')) { $this->preferences['submitButtonTitle'] = $this->paymentMethodObj->getOrderConfirmationSubmitButtonTitle(); } } }