public function delivery()
    {
        $cart = ShoppingCart::get();
        
        // If we are using simple checkout, skip
        if (Checkout::config()->simple_checkout) {
            return $this->redirect($this->Link('finish'));
        }
            
        // If customer is collecting, skip
        if ($cart->isCollection()) {
            return $this->redirect($this->Link('finish'));
        }
            
        // If cart is not deliverable, also skip
        if (!$cart->isDeliverable()) {
            return $this->redirect($this->Link('finish'));
        }
        
        // Check permissions for guest checkout
        if (!Member::currentUserID() && !Checkout::config()->guest_checkout) {
            return $this->redirect($this->Link('index'));
        }
        
        $this->customise(array(
            'Title'     => _t('Checkout.DeliveryDetails', "Delivery Details"),
            'Form'      => $this->DeliveryForm()
        ));

        $this->extend("onBeforeDelivery");

        return $this->renderWith(array(
            'Checkout_delivery',
            'Checkout',
            'Page'
        ));
    }