/**
  * statements to be called on instanciation
  *
  * @return void
  *
  * @author Sebastian Diel <*****@*****.**>
  * @since 04.03.2014
  */
 public function init()
 {
     $addressID = false;
     if (isset($_POST['addressID'])) {
         $addressID = Convert::raw2sql($_POST['addressID']);
     } else {
         $addressID = $this->getRequest()->param('ID');
     }
     $this->setAddressID($addressID);
     $this->setBreadcrumbElementID($addressID);
     if (is_numeric($addressID)) {
         // get the address to check whether it is related to the actual customer or not.
         $address = SilvercartAddress::get()->byID($addressID);
         if ($address->MemberID > 0) {
             if ($address->Member()->ID != Member::currentUserID()) {
                 // the address is not related to the customer, redirect elsewhere...
                 $this->redirect($this->Parent()->Link());
             }
         } else {
             $this->redirect($this->Parent()->Link());
         }
     } else {
         $this->redirect($this->Parent()->Link());
     }
     $this->registerCustomHtmlForm('SilvercartEditAddressForm', new SilvercartEditAddressForm($this, array('addressID' => $addressID)));
     parent::init();
 }
 /**
  * execute these statements on object call
  *
  * @return void
  * @author Roland Lehmann <*****@*****.**>
  * @since 18.10.2010
  */
 public function init()
 {
     parent::init();
     $preferences = array();
     $urlParams = $this->getURLParams();
     if ($urlParams['Action'] == 'addNewAddress') {
         $preferences['submitAction'] = 'addNewAddress/customHtmlFormSubmit';
     }
     $this->registerCustomHtmlForm('SilvercartAddAddressForm', new SilvercartAddAddressForm($this, null, $preferences));
 }
 /**
  * statements to be called on instanciation
  *
  * @author Roland Lehmann <*****@*****.**>
  * @since 25.10.2010
  * @return void
  */
 public function init()
 {
     $orderID = $this->getRequest()->param('ID');
     $this->setOrderID($orderID);
     $this->setBreadcrumbElementID($orderID);
     // get the order to check whether it is related to the actual customer or not.
     $order = SilvercartOrder::get()->byID($this->getOrderID());
     if ($order && $order->MemberID > 0) {
         if ($order->Member()->ID != Member::currentUserID()) {
             // the order is not related to the customer, redirect elsewhere...
             $this->redirect($this->Parent()->Link());
         }
     } else {
         $this->redirect($this->Parent()->Link());
     }
     parent::init();
 }
 /**
  * Initialisiert das Formularobjekt.
  *
  * @return void
  * 
  * @author Sascha Koehler <*****@*****.**>, Roland Lehmann <*****@*****.**>
  * @since 23.10.2010
  */
 public function init()
 {
     $this->registerCustomHtmlForm('SilvercartEditProfileForm', new SilvercartEditProfileForm($this));
     parent::init();
 }