public function postage()
    {
        // If no estimate found, generate error
        if (!$this->hasEstimate()) {
            return $this->redirect($this->Link("noestimate"));
        }
        
        $config = SiteConfig::current_site_config();
        $member = Security::getCurrentUser();
        $estimate = $this->getEstimate();
        
        // Check permissions for guest checkout
        if (!$member && !$config->CheckoutAllowGuest) {
            return $this->redirect($this->Link());
        }

        if (!$estimate->isDeliverable()) {
            return $this->redirect($this->Link('payment'));
        }

        $this->customise([
            'Form' => $this->PostageForm()
        ]);

        $this->extend("onBeforePostage");

        return $this->render();
    }
public function postage()
    {
        // If no estimate found, generate error
        if (!$this->hasEstimate()) {
            return $this->redirect($this->Link("noestimate"));
        }
        
        $config = SiteConfig::current_site_config();
        $member = Security::getCurrentUser();
        $estimate = $this->getEstimate();
        
        // Check permissions for guest checkout
        if (!$member && !$config->CheckoutAllowGuest) {
            return $this->redirect($this->Link());
        }

        if (!$estimate->isDeliverable()) {
            return $this->redirect($this->Link('payment'));
        }

        $this->customise([
            'Form' => $this->PostageForm()
        ]);

        $this->extend("onBeforePostage");

        return $this->render();
    }
public function postage ( ) { // If no estimate found, generate error if ( ! $ this -> hasEstimate ( ) ) { return $ this -> redirect ( $ this -> Link ( "noestimate" ) ) ; } $ config = SiteConfig :: current_site_config ( ) ; $ member = Security :: getCurrentUser ( ) ; $ estimate = $ this -> getEstimate ( ) ; // Check permissions for guest checkout if ( ! $ member && ! $ config -> CheckoutAllowGuest ) { return $ this -> redirect ( $ this -> Link ( ) ) ; } if ( ! $ estimate -> isDeliverable ( ) ) { return $ this -> redirect ( $ this -> Link ( 'payment' ) ) ; } $ this -> customise ( [ 'Form' => $ this -> PostageForm ( ) ] ) ; $ this -> extend ( "onBeforePostage" ) ; return $ this -> render ( ) ; }
Allowing user to select postage

@return array
Allowing user to select postage