src/ShopDhlPackstationBundle/pkgExtranet/objects/WebModules/MTExtranet_PkgShopDhlPackstation.class.php
protected function UpdateShippingAddress($aAddress)
    {
        $oUser = TdbDataExtranetUser::GetInstance();
        if ($oUser->DHLPackStationStatusChanged($aAddress)) {
            $aAddress = $oUser->fillPackStationFieldValue($aAddress);
            if (true === $this->isAddressBillingAddress($aAddress, $oUser) &&
                true === $this->isAddressPackstation($aAddress)
            ) {
                $this->getFlashMessage()->addMessage(
                    TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING,
                    'PkgShopDhlPackstation-ERROR-SHIPPING-IS-BILLING-MAY-NOT-BE-PACKSTATION'
                );

                return false;
            }
            $bUpdateOk = $oUser->UpdateShippingAddress($aAddress);
            $oShippingAddress = $oUser->GetShippingAddress();
            if ($oShippingAddress) {
                $bUpdateOk = $oShippingAddress->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING);
            }
        } else {
            $bUpdateOk = parent::UpdateShippingAddress($aAddress);
        }

        return $bUpdateOk;
    }
protected function UpdateShippingAddress($aAddress)
    {
        $oUser = TdbDataExtranetUser::GetInstance();
        if ($oUser->DHLPackStationStatusChanged($aAddress)) {
            $aAddress = $oUser->fillPackStationFieldValue($aAddress);
            if (true === $this->isAddressBillingAddress($aAddress, $oUser) &&
                true === $this->isAddressPackstation($aAddress)
            ) {
                $this->getFlashMessage()->addMessage(
                    TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING,
                    'PkgShopDhlPackstation-ERROR-SHIPPING-IS-BILLING-MAY-NOT-BE-PACKSTATION'
                );

                return false;
            }
            $bUpdateOk = $oUser->UpdateShippingAddress($aAddress);
            $oShippingAddress = $oUser->GetShippingAddress();
            if ($oShippingAddress) {
                $bUpdateOk = $oShippingAddress->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING);
            }
        } else {
            $bUpdateOk = parent::UpdateShippingAddress($aAddress);
        }

        return $bUpdateOk;
    }
protected function UpdateShippingAddress ( $ aAddress ) { $ oUser = TdbDataExtranetUser :: GetInstance ( ) ; if ( $ oUser -> DHLPackStationStatusChanged ( $ aAddress ) ) { $ aAddress = $ oUser -> fillPackStationFieldValue ( $ aAddress ) ; if ( true === $ this -> isAddressBillingAddress ( $ aAddress , $ oUser ) && true === $ this -> isAddressPackstation ( $ aAddress ) ) { $ this -> getFlashMessage ( ) -> addMessage ( TdbDataExtranetUserAddress :: FORM_DATA_NAME_SHIPPING , 'PkgShopDhlPackstation-ERROR-SHIPPING-IS-BILLING-MAY-NOT-BE-PACKSTATION' ) ; return false ; } $ bUpdateOk = $ oUser -> UpdateShippingAddress ( $ aAddress ) ; $ oShippingAddress = $ oUser -> GetShippingAddress ( ) ; if ( $ oShippingAddress ) { $ bUpdateOk = $ oShippingAddress -> ValidateData ( TdbDataExtranetUserAddress :: FORM_DATA_NAME_SHIPPING ) ; } } else { $ bUpdateOk = parent :: UpdateShippingAddress ( $ aAddress ) ; } return $ bUpdateOk ; }
update the shipping address with the data passed.

Set new pack station type before validating

@param array $aAddress

@return bool
update the shipping address with the data passed .