Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Geschaeftskundenversand
    • Helpers
    • Invoices
    • Orders
    • ParcelShopFinder
    • QuickEdit
    • Serializers
    • Templates
  • Geschaeftskundenversand
    • Exceptions
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • OrderStatus
    • Collections
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Repositories
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • QuickEdit
    • Interfaces
    • Repositories
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository
  • VersionInfo
    • Factories
    • Reader
    • ValueObjects

Classes

  • AbstractAddonValueServiceFactory
  • AbstractAddonValueStorage
  • AbstractApiV2Controller
  • AbstractCategoryServiceFactory
  • AbstractCollection
  • AbstractCreateAccountProcess
  • AbstractCustomerFactory
  • AbstractCustomerServiceFactory
  • AbstractFileStorage
  • AbstractHttpContextFactory
  • AbstractHttpViewControllerRegistryFactory
  • AbstractImagesApiV2Controller
  • AbstractInvoiceServiceFactory
  • AbstractJsonSerializer
  • AbstractModuleCenterModule
  • AbstractModuleCenterModuleController
  • AbstractOrderServiceFactory
  • AbstractProductAttributeServiceFactory
  • AbstractProductServiceFactory
  • AbstractSliderServiceFactory
  • AbstractVersionInfoItem
  • AbstractVersionInfoReader
  • AddonValueService
  • AddonValueServiceFactory
  • AddonValueStorageFactory
  • AddressBlock
  • AddressBookService
  • AddressClass
  • AddressesApiV2Controller
  • AddressFormatProvider
  • AddressFormatsApiV2Controller
  • AddressJsonSerializer
  • AdminFavoritesAjaxController
  • AdminHttpViewController
  • AdminInfoBoxAjaxController
  • AdminLayoutHttpControllerResponse
  • AdminPageHttpControllerResponse
  • AfterbuyAjaxController
  • AfterbuyModuleCenterModule
  • AfterbuyModuleCenterModuleController
  • AmazonAdvPaymentsModuleCenterModuleController
  • Asset
  • AssetCollection
  • AttachmentCollection
  • AttachmentName
  • AttachmentPath
  • AttachmentsApiV2Controller
  • AttachmentsHandler
  • AuthFactory
  • AuthService
  • AuthSettings
  • AuthStrategyCollection
  • BoolType
  • BrickfoxModuleCenterModule
  • BrickfoxModuleCenterModuleController
  • CacheTokenHelper
  • CartController
  • CartDropdownController
  • CartShippingCostsController
  • CategoriesApiV2Controller
  • Category
  • CategoryAddonValueStorage
  • CategoryFactory
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CategoryJsonSerializer
  • CategoryListItem
  • CategoryListItemCollection
  • CategoryListItemJsonSerializer
  • CategoryListProvider
  • CategoryListProviderFactory
  • CategoryObjectService
  • CategoryReadService
  • CategoryRepository
  • CategoryRepositoryDeleter
  • CategoryRepositoryReader
  • CategoryRepositoryWriter
  • CategoryServiceFactory
  • CategorySettings
  • CategorySettingsRepository
  • CategorySettingsRepositoryReader
  • CategorySettingsRepositoryWriter
  • CategoryWriteService
  • CheckQuantityController
  • CheckStatusController
  • ClassFinder
  • ColorHelper
  • ContactCollection
  • ContactName
  • ContactType
  • ContentNavigationCollection
  • CookieBarController
  • CountriesApiV2Controller
  • CountryJsonSerializer
  • CountryService
  • CreateAccountProcess
  • CreateGuestController
  • CreateRegistreeController
  • CrossCuttingLoader
  • CurrencyCode
  • Customer
  • CustomerAccountInputValidator
  • CustomerAdditionalAddressInfo
  • CustomerAddonValueStorage
  • CustomerAddress
  • CustomerAddressDeleter
  • CustomerAddressInputValidator
  • CustomerAddressReader
  • CustomerAddressRepository
  • CustomerAddressWriter
  • CustomerB2BStatus
  • CustomerCallNumber
  • CustomerCity
  • CustomerCompany
  • CustomerCountry
  • CustomerCountryIso2
  • CustomerCountryIso3
  • CustomerCountryName
  • CustomerCountryReader
  • CustomerCountryRepository
  • CustomerCountryZone
  • CustomerCountryZoneIsoCode
  • CustomerCountryZoneName
  • CustomerCountryZoneReader
  • CustomerCountryZoneRepository
  • CustomerDateOfBirth
  • CustomerDeleter
  • CustomerEmail
  • CustomerFactory
  • CustomerFirstname
  • CustomerGender
  • CustomerHashedPassword
  • CustomerHouseNumber
  • CustomerInputToCollectionTransformer
  • CustomerInputValidator
  • CustomerInputValidatorSettings
  • CustomerJsonSerializer
  • CustomerLastname
  • CustomerLoginController
  • CustomerMemo
  • CustomerMemoCollection
  • CustomerNumber
  • CustomerPassword
  • CustomerPostcode
  • CustomerReader
  • CustomerReadService
  • CustomerRegistrationInputValidatorService
  • CustomerRepository
  • CustomersApiV2Controller
  • CustomerService
  • CustomerServiceFactory
  • CustomerServiceSettings
  • CustomerStatusHelper
  • CustomerStatusInformation
  • CustomerStatusProvider
  • CustomerStreet
  • CustomerSuburb
  • CustomerVatNumber
  • CustomerWriter
  • CustomerWriteService
  • DashboardController
  • DataTableColumn
  • DataTableColumnCollection
  • DataTableColumnType
  • DataTableHelper
  • DecimalType
  • DefaultApiV2Controller
  • DefaultTemplateSettings
  • DocumentFileStorage
  • DynamicShopMessagesController
  • EditableCollection
  • EditableKeyValueCollection
  • EkomiModuleCenterModule
  • EkomiModuleCenterModuleController
  • Email
  • EmailAddress
  • EmailAttachment
  • EmailCollection
  • EmailContact
  • EmailContent
  • EmailDeleter
  • EmailFactory
  • EmailJsonSerializer
  • EmailParser
  • EmailReader
  • EmailRepository
  • EmailsApiV2Controller
  • EmailsController
  • EmailService
  • EmailStringType
  • EmailSubject
  • EmailWriter
  • EmbeddedModuleController
  • EmptyCurrencyCode
  • EmptyDateTime
  • EmptyLanguageCode
  • EmptyProductImage
  • EnvCategoryServiceSettings
  • EnvInvoiceServiceSettings
  • EnvironmentClassFinderSettings
  • EnvironmentHttpContextFactory
  • EnvironmentHttpViewControllerRegistryFactory
  • EnvProductImageFileStorageSettings
  • EnvSlideImageFileStorageSettings
  • ExistingDirectory
  • ExistingFile
  • ExtraContentController
  • FileDownloadInformation
  • FilenameStringType
  • FilesystemHelper
  • FilterController
  • FindologicModuleCenterModule
  • FindologicModuleCenterModuleController
  • GeschaeftskundenversandConfigurationStorage
  • GeschaeftskundenversandController
  • GeschaeftskundenversandLogger
  • GeschaeftskundenversandModuleCenterModule
  • GeschaeftskundenversandModuleCenterModuleController
  • GeschaeftskundenversandProduct
  • GeschaeftskundenversandShipment
  • GeschaeftskundenversandSoapAdapter
  • GoogleAdwordConversionModuleCenterModule
  • GoogleAdwordConversionModuleCenterModuleController
  • GXCoreLoader
  • GXCoreLoaderSettings
  • GXEngineOrder
  • GXEngineProduct
  • HeidelpayModuleCenterModuleController
  • HermesModuleCenterModule
  • HermesModuleCenterModuleController
  • HttpApiV2Controller
  • HttpContext
  • HttpContextReader
  • HttpControllerResponse
  • HttpDispatcher
  • HttpResponseProcessor
  • HttpService
  • HttpServiceFactory
  • HttpViewController
  • HttpViewControllerFactory
  • HttpViewControllerRegistry
  • IdCollection
  • IdType
  • IloxxModuleCenterModule
  • IloxxModuleCenterModuleController
  • ImageFileStorage
  • ImageProcessingController
  • ImageRequestController
  • InfoBoxFactory
  • InfoBoxMessage
  • InfoBoxMessageCollection
  • InfoBoxRepository
  • InfoBoxRepositoryDeleter
  • InfoBoxRepositoryReader
  • InfoBoxRepositoryWriter
  • InfoBoxService
  • IntrashipModuleCenterModule
  • IntrashipModuleCenterModuleController
  • IntType
  • InvoiceActions
  • InvoiceArchiveReadService
  • InvoiceArchiveWriteService
  • InvoiceFileEntitler
  • InvoiceInformation
  • InvoiceListGenerator
  • InvoiceListItem
  • InvoiceListItemCollection
  • InvoiceRepository
  • InvoiceServiceFactory
  • InvoicesModalsAjaxController
  • InvoicesOverviewAjaxController
  • InvoicesOverviewColumns
  • InvoicesOverviewController
  • InvoicesOverviewTooltips
  • ItRechtModuleCenterModule
  • ItRechtModuleCenterModuleController
  • JanolawModuleCenterModule
  • JanolawModuleCenterModuleController
  • JsConfigurationController
  • JSEngineConfiguration
  • JsonHttpControllerResponse
  • JsTranslationsController
  • KeyValueCollection
  • KlarnaModuleCenterModuleController
  • LanguageCode
  • LanguageHelper
  • LanguageProvider
  • LawsController
  • LegacyProductImageProcessing
  • LettrModuleCenterModule
  • LettrModuleCenterModuleController
  • LiveSearchController
  • MagnalisterModuleCenterModule
  • MagnalisterModuleCenterModuleController
  • MailbeezModuleCenterModule
  • MailbeezModuleCenterModuleController
  • MailerAdapter
  • MaxFileSizeController
  • Md5Strategy
  • MediafinanzModuleCenterModule
  • MediafinanzModuleCenterModuleController
  • ModuleCenterController
  • ModuleCenterModuleCollection
  • ModuleTitleProvider
  • NewAttributesController
  • NewsletterLinkModuleCenterModule
  • NewsletterLinkModuleCenterModuleController
  • NonEmptyStringType
  • OrderActions
  • OrderAddonValueStorage
  • OrderAddressBlock
  • OrderFactory
  • OrderItem
  • OrderItemAddonValueStorage
  • OrderItemAttribute
  • OrderItemAttributeCollection
  • OrderItemAttributeFactory
  • OrderItemAttributeRepository
  • OrderItemAttributeRepositoryDeleter
  • OrderItemAttributeRepositoryFactory
  • OrderItemAttributeRepositoryReader
  • OrderItemAttributeRepositoryWriter
  • OrderItemCollection
  • OrderItemDownloadInformation
  • OrderItemDownloadInformationCollection
  • OrderItemFactory
  • OrderItemProperty
  • OrderItemPropertyFactory
  • OrderItemPropertyRepository
  • OrderItemPropertyRepositoryDeleter
  • OrderItemPropertyRepositoryReader
  • OrderItemPropertyRepositoryWriter
  • OrderItemRepository
  • OrderItemRepositoryDeleter
  • OrderItemRepositoryReader
  • OrderItemRepositoryWriter
  • OrderJsonSerializer
  • OrderListGenerator
  • OrderListItem
  • OrderListItemCollection
  • OrderListItemJsonSerializer
  • OrderObjectService
  • OrderPaymentType
  • OrderReadService
  • OrderRepository
  • OrderRepositoryDeleter
  • OrderRepositoryReader
  • OrderRepositoryWriter
  • OrdersApiV2Controller
  • OrderServiceFactory
  • OrderServiceSettings
  • OrderShippingType
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrdersModalsAjaxController
  • OrdersOverviewAjaxController
  • OrdersOverviewColumns
  • OrdersOverviewController
  • OrdersOverviewTooltips
  • OrderStatus
  • OrderStatusCollection
  • OrderStatusDeleter
  • OrderStatusesApiV2Controller
  • OrderStatusFactory
  • OrderStatusHistoryListItem
  • OrderStatusHistoryListItemCollection
  • OrderStatusHistoryStorage
  • OrderStatusReader
  • OrderStatusRepository
  • OrderStatusService
  • OrderStatusServiceFactory
  • OrderStatusStyles
  • OrderStatusWriter
  • OrdersTotalsApiV2Controller
  • OrderTooltipController
  • OrderTotal
  • OrderTotalCollection
  • OrderTotalFactory
  • OrderTotalRepository
  • OrderTotalRepositoryDeleter
  • OrderTotalRepositoryReader
  • OrderTotalRepositoryWriter
  • OrderTrackingInformationCollection
  • OrderWriteService
  • PackedDownloadController
  • ParcelShopFinder
  • ParcelshopfinderController
  • ParcelShopFinderLogger
  • ParcelshopfinderModuleCenterModule
  • ParcelshopfinderModuleCenterModuleController
  • PasswordEncryptionSettings
  • PasswordHashStrategy
  • PathType
  • PaymentTitleProvider
  • PayOneModuleCenterModuleController
  • PayPalConfigurationController
  • PayPalController
  • PaypalNGModuleCenterModuleController
  • PostfinderModuleCenterModule
  • PostfinderModuleCenterModuleController
  • Precheck
  • ProductAddonValueStorage
  • ProductAttribute
  • ProductAttributeCollection
  • ProductAttributeFactory
  • ProductAttributeObjectService
  • ProductAttributeRepository
  • ProductAttributeRepositoryDeleter
  • ProductAttributeRepositoryReader
  • ProductAttributeRepositoryWriter
  • ProductAttributeService
  • ProductAttributeServiceFactory
  • ProductAttributesModuleCenterModule
  • ProductAttributesModuleCenterModuleController
  • ProductCategoryLinker
  • ProductFactory
  • ProductImage
  • ProductImageCollection
  • ProductImageContainer
  • ProductImageContainerRepository
  • ProductImageFileStorage
  • ProductImagesApiV2Controller
  • ProductJsonSerializer
  • ProductListItem
  • ProductListItemCollection
  • ProductListItemJsonSerializer
  • ProductListProvider
  • ProductListProviderFactory
  • ProductObjectService
  • ProductPermissionSetter
  • ProductQuestionController
  • ProductReadService
  • ProductRepository
  • ProductRepositoryDeleter
  • ProductRepositoryReader
  • ProductRepositoryWriter
  • ProductsApiV2Controller
  • ProductServiceFactory
  • ProductSettings
  • ProductSettingsRepository
  • ProductSettingsRepositoryReader
  • ProductSettingsRepositoryWriter
  • ProductsLinksApiV2Controller
  • ProductWriteService
  • ProtectedShopsModuleCenterModule
  • ProtectedShopsModuleCenterModuleController
  • QuickEditDocuments
  • QuickEditOverviewAjaxController
  • QuickEditOverviewColumns
  • QuickEditOverviewController
  • QuickEditOverviewTooltips
  • QuickEditProductGraduatedPricesReader
  • QuickEditProductGraduatedPricesRepository
  • QuickEditProductListItem
  • QuickEditProductPropertiesAjaxController
  • QuickEditProductPropertiesListItem
  • QuickEditProductPropertiesReader
  • QuickEditProductPropertiesRepository
  • QuickEditProductPropertiesWriter
  • QuickEditProductSpecialPriceListItem
  • QuickEditProductSpecialPricesReader
  • QuickEditProductSpecialPricesRepository
  • QuickEditProductSpecialPricesWriter
  • QuickEditPropertiesOverviewColumns
  • QuickEditPropertiesTooltips
  • QuickEditService
  • QuickEditServiceFactory
  • QuickEditSpecialPricesAjaxController
  • QuickEditSpecialPricesOverviewColumns
  • QuickEditSpecialPriceTooltips
  • RedirectHttpControllerResponse
  • SessionTimeoutAjaxController
  • SharedShoppingCartConfigurationController
  • SharedShoppingCartController
  • SharedShoppingCartDeleter
  • SharedShoppingCartModuleCenterModule
  • SharedShoppingCartModuleCenterModuleController
  • SharedShoppingCartReader
  • SharedShoppingCartRepository
  • SharedShoppingCartService
  • SharedShoppingCartSettings
  • SharedShoppingCartWriter
  • ShipcloudController
  • ShipcloudModuleCenterModule
  • ShipcloudModuleCenterModuleController
  • ShippingTitleProvider
  • ShopInformationApiV2Controller
  • ShopKeyController
  • Slide
  • SlideCollection
  • SlideImage
  • SlideImageArea
  • SlideImageAreaCollection
  • SlideImageAreaRepository
  • SlideImageAreaRepositoryDeleter
  • SlideImageAreaRepositoryReader
  • SlideImageAreaRepositoryWriter
  • SlideImageCollection
  • SlideImageFileStorage
  • SlideImageRepository
  • SlideImageRepositoryDeleter
  • SlideImageRepositoryReader
  • SlideImageRepositoryWriter
  • Slider
  • SliderAssignmentRepository
  • SliderCollection
  • SlideRepository
  • SlideRepositoryDeleter
  • SlideRepositoryReader
  • SlideRepositoryWriter
  • SliderJsonSerializer
  • SliderReadService
  • SliderRepository
  • SliderRepositoryDeleter
  • SliderRepositoryReader
  • SliderRepositoryWriter
  • SlidersDetailsAjaxController
  • SlidersDetailsController
  • SliderServiceFactory
  • SlidersOverviewAjaxController
  • SlidersOverviewController
  • SliderWriteService
  • StaticCrossCuttingLoader
  • StaticGXCoreLoader
  • StatisticsService
  • StoredCategory
  • StoredOrderItem
  • StoredOrderItemAttribute
  • StoredOrderItemAttributeCollection
  • StoredOrderItemCollection
  • StoredOrderItemProperty
  • StoredOrderTotal
  • StoredOrderTotalCollection
  • StoredProduct
  • StoredProductAttribute
  • StoredProductAttributeCollection
  • StringCollection
  • StringHelper
  • StringType
  • StyleEdit3AuthenticationController
  • TaxClassesApiV2Controller
  • TaxRatesApiV2Controller
  • TaxZonesApiV2Controller
  • TemplateConfigurationController
  • TrustedShopsModuleCenterModule
  • TrustedShopsModuleCenterModuleController
  • UnknownCustomerCountry
  • UploadedFile
  • UrlRewrite
  • UrlRewriteCollection
  • UrlRewriteStorage
  • UserConfigurationController
  • UserConfigurationReader
  • UserConfigurationService
  • UserConfigurationWriter
  • UsernamePasswordCredentials
  • VatNumberValidator
  • VersionInfoController
  • VersionInfoDatabaseItem
  • VersionInfoDatabaseReader
  • VersionInfoFileItem
  • VersionInfoFileReader
  • VersionInfoItemFactory
  • VersionInfoRepository
  • VersionInfoService
  • VersionInfoServiceFactory
  • WishListController
  • WritableDirectory
  • WritableFile
  • YategoModuleCenterModule
  • YategoModuleCenterModuleController
  • YoochooseModuleCenterModule
  • YoochooseModuleCenterModuleController
  • ZoneJsonSerializer
  • ZonesApiV2Controller

Interfaces

  • AddonValueContainerInterface
  • AddonValueServiceInterface
  • AddonValueStorageFactoryInterface
  • AddressBlockInterface
  • AddressBookServiceInterface
  • AddressClassInterface
  • AddressFormatProviderInterface
  • AdminStatusOnlyInterface
  • AssetCollectionInterface
  • AssetInterface
  • AttachmentCollectionInterface
  • AttachmentNameInterface
  • AttachmentPathInterface
  • AttachmentsHandlerInterface
  • AuthCredentialsInterface
  • AuthFactoryInterface
  • AuthServiceInterface
  • AuthSettingsInterface
  • AuthStrategyInterface
  • CacheTokenHelperInterface
  • CategoryFactoryInterface
  • CategoryInterface
  • CategoryListProviderFactoryInterface
  • CategoryListProviderInterface
  • CategoryObjectServiceInterface
  • CategoryReadServiceInterface
  • CategoryRepositoryDeleterInterface
  • CategoryRepositoryInterface
  • CategoryRepositoryReaderInterface
  • CategoryRepositoryWriterInterface
  • CategoryServiceSettingsInterface
  • CategorySettingsInterface
  • CategorySettingsRepositoryInterface
  • CategorySettingsRepositoryReaderInterface
  • CategorySettingsRepositoryWriterInterface
  • CategoryWriteServiceInterface
  • ClassFinderInterface
  • ClassFinderSettingsInterface
  • ContactCollectionInterface
  • ContactNameInterface
  • ContactTypeInterface
  • ContentNavigationCollectionInterface
  • ContentViewInterface
  • CountryServiceInterface
  • CrossCuttingLoaderInterface
  • CrossCuttingObjectInterface
  • CustomerAccountInputValidatorInterface
  • CustomerAdditionalAddressInfoInterface
  • CustomerAddressDeleterInterface
  • CustomerAddressInputValidatorInterface
  • CustomerAddressInterface
  • CustomerAddressReaderInterface
  • CustomerAddressRepositoryInterface
  • CustomerAddressWriterInterface
  • CustomerB2BStatusInterface
  • CustomerCallNumberInterface
  • CustomerCityInterface
  • CustomerCompanyInterface
  • CustomerCountryInterface
  • CustomerCountryIso2Interface
  • CustomerCountryIso3Interface
  • CustomerCountryNameInterface
  • CustomerCountryReaderInterface
  • CustomerCountryRepositoryInterface
  • CustomerCountryZoneInterface
  • CustomerCountryZoneIsoCodeInterface
  • CustomerCountryZoneNameInterface
  • CustomerCountryZoneReaderInterface
  • CustomerCountryZoneRepositoryInterface
  • CustomerDeleterInterface
  • CustomerEmailInterface
  • CustomerFirstnameInterface
  • CustomerGenderInterface
  • CustomerHouseNumberInterface
  • CustomerInputValidatorInterface
  • CustomerInputValidatorSettingsInterface
  • CustomerInterface
  • CustomerLastnameInterface
  • CustomerNumberInterface
  • CustomerPasswordInterface
  • CustomerPostcodeInterface
  • CustomerReaderInterface
  • CustomerReadServiceInterface
  • CustomerRegistrationInputValidatorServiceInterface
  • CustomerRepositoryInterface
  • CustomerServiceInterface
  • CustomerServiceSettingsInterface
  • CustomerStatusHelperInterface
  • CustomerStatusProviderInterface
  • CustomerStreetInterface
  • CustomerSuburbInterface
  • CustomerVatNumberInterface
  • CustomerWriterInterface
  • CustomerWriteServiceInterface
  • EmailAddressInterface
  • EmailAttachmentInterface
  • EmailCollectionInterface
  • EmailContactInterface
  • EmailContentInterface
  • EmailDeleterInterface
  • EmailFactoryInterface
  • EmailInterface
  • EmailReaderInterface
  • EmailRepositoryInterface
  • EmailServiceInterface
  • EmailSubjectInterface
  • EmailWriterInterface
  • FilesystemHelperInterface
  • GXCoreLoaderInterface
  • GXCoreLoaderSettingsInterface
  • HttpContextInterface
  • HttpContextReaderInterface
  • HttpControllerResponseInterface
  • HttpDispatcherInterface
  • HttpResponseProcessorInterface
  • HttpServiceFactoryInterface
  • HttpServiceInterface
  • HttpViewControllerFactoryInterface
  • HttpViewControllerInterface
  • HttpViewControllerRegistryInterface
  • IdInterface
  • InfoBoxFactoryInterface
  • InfoBoxMessageInterface
  • InfoBoxRepositoryDeleterInterface
  • InfoBoxRepositoryInterface
  • InfoBoxRepositoryReaderInterface
  • InfoBoxRepositoryWriterInterface
  • InfoBoxServiceInterface
  • InvoiceArchiveReadServiceInterface
  • InvoiceArchiveWriteServiceInterface
  • InvoiceFileEntitlerInterface
  • InvoiceListGeneratorInterface
  • InvoiceRepositoryInterface
  • InvoiceServiceSettingsInterface
  • LanguageHelperInterface
  • LanguageProviderInterface
  • MailerAdapterInterface
  • ModuleCenterModuleCollectionInterface
  • ModuleCenterModuleInterface
  • OrderFactoryInterface
  • OrderInterface
  • OrderItemAttributeFactoryInterface
  • OrderItemAttributeInterface
  • OrderItemAttributeRepositoryDeleterInterface
  • OrderItemAttributeRepositoryFactoryInterface
  • OrderItemAttributeRepositoryInterface
  • OrderItemAttributeRepositoryReaderInterface
  • OrderItemAttributeRepositoryWriterInterface
  • OrderItemFactoryInterface
  • OrderItemInterface
  • OrderItemPropertyFactoryInterface
  • OrderItemPropertyRepositoryDeleterInterface
  • OrderItemPropertyRepositoryReaderInterface
  • OrderItemPropertyRepositoryWriterInterface
  • OrderItemRepositoryDeleterInterface
  • OrderItemRepositoryInterface
  • OrderItemRepositoryReaderInterface
  • OrderItemRepositoryWriterInterface
  • OrderListGeneratorInterface
  • OrderObjectServiceInterface
  • OrderPaymentTypeInterface
  • OrderReadServiceInterface
  • OrderRepositoryDeleterInterface
  • OrderRepositoryInterface
  • OrderRepositoryReaderInterface
  • OrderRepositoryWriterInterface
  • OrderServiceSettingsInterface
  • OrderShippingTypeInterface
  • OrderStatusDeleterInterface
  • OrderStatusFactoryInterface
  • OrderStatusHistoryReaderInterface
  • OrderStatusHistoryWriterInterface
  • OrderStatusInterface
  • OrderStatusReaderInterface
  • OrderStatusRepositoryInterface
  • OrderStatusServiceFactoryInterface
  • OrderStatusServiceInterface
  • OrderStatusWriterInterface
  • OrderTotalFactoryInterface
  • OrderTotalInterface
  • OrderTotalRepositoryDeleterInterface
  • OrderTotalRepositoryInterface
  • OrderTotalRepositoryReaderInterface
  • OrderTotalRepositoryWriterInterface
  • OrderWriteServiceInterface
  • ProductAttributeFactoryInterface
  • ProductAttributeInterface
  • ProductAttributeObjectServiceInterface
  • ProductAttributeRepositoryDeleterInterface
  • ProductAttributeRepositoryInterface
  • ProductAttributeRepositoryReaderInterface
  • ProductAttributeRepositoryWriterInterface
  • ProductAttributeServiceInterface
  • ProductCategoryLinkerInterface
  • ProductFactoryInterface
  • ProductImageContainerInterface
  • ProductImageContainerRepositoryInterface
  • ProductImageInterface
  • ProductImagePathsSettingsInterface
  • ProductImageProcessingInterface
  • ProductInterface
  • ProductListProviderFactoryInterface
  • ProductListProviderInterface
  • ProductObjectServiceInterface
  • ProductPermissionSetterInterface
  • ProductReadServiceInterface
  • ProductRepositoryDeleterInterface
  • ProductRepositoryInterface
  • ProductRepositoryReaderInterface
  • ProductRepositoryWriterInterface
  • ProductSettingsInterface
  • ProductSettingsRepositoryInterface
  • ProductSettingsRepositoryReaderInterface
  • ProductSettingsRepositoryWriterInterface
  • ProductWriteServiceInterface
  • QuickEditDocumentsInterface
  • QuickEditOverviewColumnsInterface
  • QuickEditOverviewTooltipsInterface
  • QuickEditProductGraduatedPricesReaderInterface
  • QuickEditProductGraduatedPricesRepositoryInterface
  • QuickEditProductPropertiesReaderInterface
  • QuickEditProductPropertiesRepositoryInterface
  • QuickEditProductPropertiesWriterInterface
  • QuickEditProductSpecialPricesReaderInterface
  • QuickEditProductSpecialPricesRepositoryInterface
  • QuickEditProductSpecialPricesWriterInterface
  • QuickEditPropertiesOverviewColumnsInterface
  • QuickEditPropertiesTooltipsInterface
  • QuickEditServiceFactoryInterface
  • QuickEditServiceInterface
  • QuickEditSpecialPricesOverviewColumnsInterface
  • QuickEditSpecialPriceTooltipsInterface
  • SerializerInterface
  • SharedShoppingCartDeleterInterface
  • SharedShoppingCartReaderInterface
  • SharedShoppingCartRepositoryInterface
  • SharedShoppingCartServiceInterface
  • SharedShoppingCartSettingsInterface
  • SharedShoppingCartWriterInterface
  • SlideImageAreaInterface
  • SlideImageAreaRepositoryDeleterInterface
  • SlideImageAreaRepositoryInterface
  • SlideImageAreaRepositoryReaderInterface
  • SlideImageAreaRepositoryWriterInterface
  • SlideImageInterface
  • SlideImagePathsSettingsInterface
  • SlideImageRepositoryDeleterInterface
  • SlideImageRepositoryInterface
  • SlideImageRepositoryReaderInterface
  • SlideImageRepositoryWriterInterface
  • SlideInterface
  • SliderAssignmentRepositoryInterface
  • SlideRepositoryDeleterInterface
  • SlideRepositoryInterface
  • SlideRepositoryReaderInterface
  • SlideRepositoryWriterInterface
  • SliderInterface
  • SliderReadServiceInterface
  • SliderRepositoryDeleterInterface
  • SliderRepositoryInterface
  • SliderRepositoryReaderInterface
  • SliderRepositoryWriterInterface
  • SliderWriteServiceInterface
  • StatisticsServiceInterface
  • StoredCategoryInterface
  • StoredOrderItemAttributeInterface
  • StoredOrderItemInterface
  • StoredOrderTotalInterface
  • StoredProductAttributeInterface
  • StoredProductInterface
  • StringHelperInterface
  • UrlKeywordsRepairerInterface
  • UserConfigurationReaderInterface
  • UserConfigurationServiceInterface
  • UserConfigurationWriterInterface
  • VatNumberValidatorInterface
  • VersionInfoItemInterface

Exceptions

  • AjaxException
  • AttachmentNotFoundException
  • FileNotFoundException
  • GeschaeftskundenversandProductException
  • GeschaeftskundenversandShipmentException
  • GeschaeftskundenversandShipmentInvalidExportTypeException
  • GeschaeftskundenversandShipmentInvalidTermsOfTradeException
  • GeschaeftskundenversandSoapAdapterCigCredentialsMissingException
  • GeschaeftskundenversandSoapAdapterException
  • GeschaeftskundenversandSoapAdapterServiceUnavailableException
  • HttpApiV2Exception
  • InvalidCustomerDataException
  • InvalidEkpFormatException
  • InvalidGKVAttendanceFormatException
  • InvalidGKVProductTypeException
  • MissingControllerNameException
  • OrderStatusIdExistsException
  • OrderStatusIdNotExistsException
  • OrderStatusNotFoundException
  • UnknownEnvironmentException
  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 
<?php

/* --------------------------------------------------------------
    ParcelshopfinderController.inc.php 2017-04-05
    Gambio GmbH
    http://www.gambio.de
    Copyright (c) 2017 Gambio GmbH
    Released under the GNU General Public License (Version 2)
    [http://www.gnu.org/licenses/gpl-2.0.html]
    --------------------------------------------------------------
*/

/**
 * Class ParcelshopfinderController
 *
 * @extends    HttpViewController
 * @category   System
 * @package    HttpViewControllers
 */
class ParcelshopfinderController extends HttpViewController
{
    /**
     * @var ConfigurationStorage
     */
    protected $configuration;
    
    /**
     * @var LanguageTextManager
     */
    protected $languageTextManager;
    
    
    protected function init()
    {
        $this->languageTextManager = MainFactory::create('LanguageTextManager', 'parcelshopfinder',
                                                         $_SESSION['language_id']);
        $this->configuration       = MainFactory::create('ConfigurationStorage', 'modules/shipping/parcelshopfinder');
        $this->contentView->set_template_dir(DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/module/');
    }
    
    
    public function actionDefault()
    {
        if(empty($_SESSION['customer_id']))
        {
            return MainFactory::create('RedirectHttpControllerResponse', xtc_href_link(FILENAME_DEFAULT, '', 'SSL'));
        }
        
        $street  = $this->_getQueryParameter('street');
        $house   = $this->_getQueryParameter('house');
        $zip     = $this->_getQueryParameter('zip');
        $city    = $this->_getQueryParameter('city');
        $country = $this->_getQueryParameter('country');
        $country = strtoupper(substr(trim($country), 0, 2));
        
        /*
        officially supported countries:
        Austria, Belgium, Czech Republic, Germany, Netherlands, Poland, Slovakia
        */
        $db                 = StaticGXCoreLoader::getDatabaseQueryBuilder();
        $supportedCountries = ['AT', 'BE', 'CZ', 'DE', 'NL', 'PL', 'SK'];
        $db->where(sprintf('countries_iso_code_2 IN (\'%s\')', implode('\', \'', $supportedCountries)));
        $countries = $db->get_where('countries', ['status' => '1'])->result_array();
        
        if(empty($country))
        {
            $defaultAddress = $db->get_where('address_book',
                                             ['address_book_id' => $_SESSION['customer_default_address_id']])->row();
            $countryService = StaticGXCoreLoader::getService('Country');
            $addressCountry = $countryService->getCountryById(MainFactory::create('IdType',
                                                                                  (int)$defaultAddress->entry_country_id));
            if(empty($defaultAddress->entry_house_number))
            {
                $splitStreet = $this->splitStreet($defaultAddress->entry_street_address);
            }
            else
            {
                $splitStreet = [
                    'street' => $defaultAddress->entry_street_address, 'house_no' => $defaultAddress->entry_house_number
                ];
            }
            $street      = $splitStreet['street'];
            $house       = $splitStreet['house_no'];
            $zip         = $defaultAddress->entry_postcode;
            $city        = $defaultAddress->entry_city;
            $country     = $addressCountry->getIso2();
            $redirectUrl = xtc_href_link('shop.php', http_build_query([
                                                                          'do'                => 'Parcelshopfinder',
                                                                          'checkout_started'  => $this->_getQueryParameter('checkout_started')
                                                                                                 == 1
                                                                              ? '1'
                                                                              : '0',
                                                                          'street' => $street,
                                                                          'house'             => $house, 'zip' => $zip,
                                                                          'city'              => $city,
                                                                          'country'           => (string)$country,
                                                                      ]), 'SSL', true, true, false, false);
            
            return MainFactory::create('RedirectHttpControllerResponse', $redirectUrl);
        }
        
        $tplData = [
            'form_action'              => xtc_href_link('shop.php', '', 'SSL'), 'do' => 'Parcelshopfinder',
            'street'                   => $street, 'house' => $house, 'zip' => $zip, 'city' => $city,
            'country'                  => $country, 'countries' => $countries,
            'checkout_started'         => $this->_getQueryParameter('checkout_started') == 1
                ? '1'
                : '0',
            'search_result' => $this->_getSearchResultOutput($country, $city, $zip, $house, $street),
        ];
        
        $mainContent = $this->_render('parcelshopfinder.html', $tplData);
        
        $GLOBALS['breadcrumb']->add($this->languageTextManager->get_text('parcelshopfinder_breadcrumb'),
                                    xtc_href_link('shop.php', xtc_get_all_get_params(['do']) . '&do=Parcelshopfinder',
                                                  'SSL'));
        
        $layoutContentControl = MainFactory::create_object('LayoutContentControl');
        $layoutContentControl->set_data('GET', $this->_getQueryParametersCollection()->getArray());
        $layoutContentControl->set_data('POST', $this->_getPostDataCollection()->getArray());
        $layoutContentControl->set_('coo_breadcrumb', $GLOBALS['breadcrumb']);
        $layoutContentControl->set_('coo_product', $GLOBALS['product']);
        $layoutContentControl->set_('coo_xtc_price', $GLOBALS['xtPrice']);
        $layoutContentControl->set_('c_path', $GLOBALS['cPath']);
        $layoutContentControl->set_('main_content', $mainContent);
        $layoutContentControl->set_('request_type', $GLOBALS['request_type']);
        $layoutContentControl->proceed();
        
        $redirectUrl = $layoutContentControl->get_redirect_url();
        if(!empty($redirectUrl))
        {
            return MainFactory::create('RedirectHttpControllerResponse', $redirectUrl);
        }
        
        return MainFactory::create('HttpControllerResponse', $layoutContentControl->get_response());
    }
    
    
    protected function _getSearchResultOutput($country, $city, $zip, $house, $street)
    {
        $firstname  = $this->_getQueryParameter('firstname')
            ? : $_SESSION['customer_first_name'];
        $lastname   = $this->_getQueryParameter('lastname')
            ? : $_SESSION['customer_last_name'];
        $postnumber = $this->_getQueryParameter('postnumber')
            ? : '';
        $postnumber = preg_replace('/[^\d]/', '', $postnumber);
        $error      = $this->_getQueryParameter('error');
        
        if(empty($country))
        {
            return '';
        }
        
        $address          = sprintf('%s %s %s %s %s', $zip, $city, $street, $house, $country);
        $address_readable = '';
        $address_readable .= !empty($street)
            ? $street . ' ' . $house . ', '
            : '';
        $address_readable .= $zip . ' ' . $city . ' (' . $country . ')';
        $psf              = MainFactory::create('ParcelShopFinder');
        $psfList          = $psf->getParcelLocationByAddress($address);
        
        if(is_array($psfList))
        {
            $maximumListEntries = max(10, (int)$this->configuration->get('maximum_list_entries'));
            $psfList            = array_slice($psfList, 0, $maximumListEntries);
        }
        
        if(!empty($error))
        {
            if($error === 'invalid_postnumber')
            {
                $errorMessage = $this->languageTextManager->get_text('error_invalid_postnumber');
            }
        }
        
        $tplData = [
            'error_message'            => $errorMessage
                ? : '', 'customer'     => [
                'firstname' => $firstname, 'lastname' => $lastname, 'postnumber' => $postnumber,
            ], 'search'                => base64_encode(serialize([$street, $house, $zip, $city, $country])),
            'address'                  => $address_readable, 'country' => $country, 'psflist' => $psfList,
            'oo_translation'           => [
                'mo' => $this->languageTextManager->get_text('openinghours_day_mo'),
                'tu' => $this->languageTextManager->get_text('openinghours_day_tu'),
                'we' => $this->languageTextManager->get_text('openinghours_day_we'),
                'th' => $this->languageTextManager->get_text('openinghours_day_th'),
                'fr' => $this->languageTextManager->get_text('openinghours_day_fr'),
                'sa' => $this->languageTextManager->get_text('openinghours_day_sa'),
                'su' => $this->languageTextManager->get_text('openinghours_day_su'), 'dash' => '-',
                '|'  => $this->languageTextManager->get_text('openinghours_and'),
            ], 'google_map_type'       => $this->configuration->get('google_map_type'),
            'googleApiKey'             => $this->configuration->get('google_api_key'),
            'form_action_new_ab_entry' => xtc_href_link('shop.php', 'do=Parcelshopfinder/AddAddressBookEntry', 'SSL'),
            'backlink'                 => xtc_href_link('shop.php', 'do=Parcelshopfinder', 'SSL'),
            'checkout_started'         => $this->_getQueryParameter('checkout_started') == 1
                ? '1'
                : '0',
        ];
        if($tplData['google_map_type'] === 'static')
        {
            $tplData['mapUrl'] = $this->makeMapUrl($psfList);
        }
        if($tplData['google_map_type'] === 'dynamic')
        {
            $tplData['markerData'] = $this->makeMarkersJson($psfList);
        }
        
        $mainContent = $this->_render('parcelshopfinder_result.html', $tplData);
        
        return $mainContent;
    }
    
    
    public function actionAddAddressBookEntry()
    {
        if(empty($_SESSION['customer_id']))
        {
            return MainFactory::create('RedirectHttpControllerResponse', xtc_href_link(FILENAME_DEFAULT, '', 'SSL'));
        }
        
        if($_SERVER['REQUEST_METHOD'] === 'POST')
        {
            $firstname        = $this->_getPostData('firstname');
            $lastname         = $this->_getPostData('lastname');
            $postnumber       = $this->_getPostData('postnumber');
            $street_address   = $this->_getPostData('street_address');
            $house_number     = $this->_getPostData('house_number');
            $additional_info  = $this->_getPostData('additional_info');
            $postcode         = $this->_getPostData('postcode');
            $city             = $this->_getPostData('city');
            $country_iso2     = $this->_getPostData('country');
            $country_iso2     = strtolower(substr(trim($country_iso2), 0, 2));
            $checkout_started = $this->_getPostData('checkout_started') == 1;
            
            $addressClass = 'psf/undefined';
            if($country_iso2 == 'de')
            {
                if(stripos($street_address, 'packstation') !== false)
                {
                    $addressClass = 'packstation_2';
                }
                if(stripos($street_address, 'postfiliale') !== false)
                {
                    $addressClass = 'postfiliale_2';
                }
                if(stripos($street_address, 'paketshop') !== false || stripos($street_address, 'parcel shop') !== false)
                {
                    $addressClass = 'postfiliale_2';
                }
                
                $postnumber = abs(filter_var($postnumber, FILTER_SANITIZE_NUMBER_INT));
                if($postnumber == 0 || $this->isValidPostnummer($postnumber) !== true)
                {
                    $search    = unserialize(base64_decode($this->_getPostData('search')));
                    $psfParams = [
                        'street'     => $search[0], 'house' => $search[1], 'zip' => $search[2], 'city' => $search[3],
                        'country'    => $search[4], 'firstname' => $firstname, 'lastname' => $lastname,
                        'postnumber' => $postnumber, 'additional_info' => $additional_info,
                        'error'      => 'invalid_postnumber',
                    ];
                    
                    return MainFactory::create('RedirectHttpControllerResponse', xtc_href_link('shop.php',
                                                                                               'do=Parcelshopfinder/SearchByAddress&'
                                                                                               . http_build_query($psfParams),
                                                                                               'SSL', true, true, false,
                                                                                               false));
                }
                $additional_info = sprintf('Postnummer %s', $postnumber);
            }
            else
            {
                $postnumber   = '';
                $addressClass = 'parcelshop';
            }
            
            $country     = $this->findCountryByIso2($country_iso2);
            $countryZone = MainFactory::create('CustomerCountryZone', new IdType(0),
                                               MainFactory::create('CustomerCountryZoneName', ''),
                                               MainFactory::create('CustomerCountryZoneIsoCode', ''));
            
            $addressBlock = MainFactory::create('AddressBlock', MainFactory::create('CustomerGender', ''),
                                                MainFactory::create('CustomerFirstname', $firstname),
                                                MainFactory::create('CustomerLastname', $lastname),
                                                MainFactory::create('CustomerCompany', ''),
                                                MainFactory::create('CustomerB2BStatus',
                                                                    (bool)$_SESSION['customer_b2b_status']),
                                                MainFactory::create('CustomerStreet', $street_address),
                                                MainFactory::create('CustomerHouseNumber', $house_number),
                                                MainFactory::create('CustomerAdditionalAddressInfo', $additional_info),
                                                MainFactory::create('CustomerSuburb', ''),
                                                MainFactory::create('CustomerPostcode', $postcode),
                                                MainFactory::create('CustomerCity', $city), $country, $countryZone);
            
            $customerService    = StaticGXCoreLoader::getService('Customer');
            $customer           = $customerService->getCustomerById(MainFactory::create('IdType',
                                                                                        $_SESSION['customer_id']));
            $addressBookService = StaticGXCoreLoader::getService('AddressBook');
            $newAddress         = $addressBookService->createNewAddress($addressBlock, $customer);
            $newAddress->setAddressClass(MainFactory::create('AddressClass', $addressClass));
            $addressBookService->updateCustomerAddress($newAddress);
            if($checkout_started === true)
            {
                $_SESSION['sendto'] = $newAddress->getId();
            }
        }
        
        if($checkout_started === true)
        {
            return MainFactory::create('RedirectHttpControllerResponse',
                                       xtc_href_link('checkout_shipping.php', '', 'SSL'));
        }
        else
        {
            return MainFactory::create('RedirectHttpControllerResponse', xtc_href_link('address_book.php', '', 'SSL'));
        }
    }
    
    
    public function actionValidatePostnumber()
    {
        $postnumber = $this->_getQueryParameter('postnumber');
        $result     = [
            'postnumberIsValid' => !empty($postnumber) && is_numeric($postnumber)
                                   && $this->isValidPostnummer($postnumber),
        ];
        
        return MainFactory::create('JsonHttpControllerResponse', $result);
    }
    
    
    /* ================================================================================================================================= */
    
    /**
     * checks validity of a DHL post number
     *
     * @param $postnum string post number (up to 10 digits)
     *
     * @return bool true if $postnum represents a (syntactically) valid post number
     */
    public function isValidPostnummer($postnum)
    {
        $postnum = sprintf('%010d', $postnum);
        $sum1    = 0;
        for($i = 8; $i >= 0; $i -= 2)
        {
            $sum1 += $postnum[$i];
        }
        $sum2 = 0;
        for($j = 7; $j >= 1; $j -= 2)
        {
            $sum2 += $postnum[$j];
        }
        $sum12    = ($sum1 * 4) + ($sum2 * 9);
        $checknum = (10 - ($sum12 % 10)) % 10;
        $is_valid = $postnum[9] == $checknum;
        
        return $is_valid;
    }
    
    
    /**
     * finds a country by its 2-letter ISO code
     *
     * @todo To be refactored as soon as CountryService::findCountryByIso2() becomes available
     *
     * @param $iso2 string 2-letter ISO code
     *
     * @return CustomerCountry
     */
    protected function findCountryByIso2($iso2)
    {
        $iso2       = strtolower(substr($iso2, 0, 2));
        $db         = StaticGXCoreLoader::getDatabaseQueryBuilder();
        $countryRow = $db->get_where('countries', ['countries_iso_code_2' => $iso2])->row();
        if($countryRow === null)
        {
            throw new Exception('Invalid country code');
        }
        $countries_id   = $countryRow->countries_id;
        $countryService = StaticGXCoreLoader::getService('Country');
        $country        = $countryService->getCountryById(MainFactory::create('IdType', $countries_id));
        
        return $country;
    }
    
    
    protected function makeMarkersJson($psfList)
    {
        $mapLabels   = [
            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
            'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'α', 'β', 'γ', 'δ', 'ε', 'φ', 'γ',
            'ψ', 'ι', 'θ', 'κ', 'λ', 'μ', 'ν', 'π', 'ϕ', 'ρ', 'σ', 'τ', 'ω', '•', '•', '•', '•', '•', '•', '•', '•',
            '•', '•', '•', '•', '•', '•', '•', '•', '•', '•', '•', '•', '•', '•', '•', '•', '•', '•',
        ];
        $markersJson = [];
        $labelIndex  = -1;
        $lastLat     = 0;
        $lastLng     = 0;
        foreach($psfList as $psfIndex => $psfEntry)
        {
            $title = '';
            if(!empty($psfEntry->additionalInfo))
            {
                $title .= $psfEntry->additionalInfo;
            }
            else
            {
                $title .= $psfEntry->keyWord . ' ' . $psfEntry->primaryKeyZipRegion;
            }
            $title .= ' ' . $psfEntry->shopName;
            if($psfEntry->geoPosition->latitude != $lastLat && $psfEntry->geoPosition->longitude != $lastLng)
            {
                $labelIndex++;
                if(!array_key_exists($labelIndex, $mapLabels))
                {
                    break;
                }
                $markersJson[] = [
                    'position' => [
                        'lat' => $psfEntry->geoPosition->latitude, 'lng' => $psfEntry->geoPosition->longitude
                    ], 'title' => $title, 'label' => $mapLabels[$labelIndex],
                ];
            }
            $psfEntry->mapMarkerLabel = $mapLabels[$labelIndex];
            $lastLat                  = $psfEntry->geoPosition->latitude;
            $lastLng                  = $psfEntry->geoPosition->longitude;
        }
        
        return json_encode($markersJson);
    }
    
    
    protected function makeMapUrl($psfList)
    {
        $googleApiKey    = $this->configuration->get('google_api_key');
        $googleUrlSecret = $this->configuration->get('google_url_signature_secret');
        
        if(empty($googleApiKey) || empty($googleUrlSecret))
        {
            return false;
        }
        
        $googleUrlSecret = strtr($googleUrlSecret, ['-' => '+', '_' => '/']);
        $googleUrlSecret = base64_decode($googleUrlSecret);
        
        $mapLabels  = [
            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
            'V', 'W', 'X', 'Y', 'Z'
        ];
        $mapMarkers = [];
        
        foreach($psfList as $psfIndex => $psfEntry)
        {
            if(array_key_exists($psfIndex, $mapLabels))
            {
                $mapMarkers[] = [
                    'color' => 'yellow', 'label' => $mapLabels[$psfIndex], 'lat' => $psfEntry->geoPosition->latitude,
                    'lon'   => $psfEntry->geoPosition->longitude,
                ];
                
                $psfEntry->mapMarkerLabel = $mapLabels[$psfIndex];
            }
            else
            {
                break;
            }
        }
        
        $mapMarkersArray       = array_map(function ($markerData)
        {
            return 'markers=' . rawurlencode(sprintf('color:%s|label:%s|%s,%s', $markerData['color'],
                                                     $markerData['label'], $markerData['lat'], $markerData['lon']));
        }, $mapMarkers);
        $mapMarkersQueryString = implode('&', $mapMarkersArray);
        
        $mapParameters = [
            'zoom' => '13', 'size' => '600x600', 'maptype' => 'roadmap', 'key' => $googleApiKey,
        ];
        $mapUrl        = sprintf('%s?%s&%s', '/maps/api/staticmap', http_build_query($mapParameters),
                                 $mapMarkersQueryString);
        $signature     = hash_hmac('sha1', $mapUrl, $googleUrlSecret, true);
        $signature     = base64_encode($signature);
        $signature     = strtr($signature, ['+' => '-', '/' => '_']);
        $mapUrl        = 'https://maps.googleapis.com' . $mapUrl . '&signature=' . $signature;
        
        return $mapUrl;
    }
    
    /* ================================================================================================================================= */
    
    /**
     * Heuristically splits up a street address into its component street name and house number
     *
     * @param  string
     *
     * @return array with keys 'street' and 'house_no'
     */
    protected function splitStreet($street_address)
    {
        $street_address = trim($street_address);
        $splitStreet    = [
            'street' => $street_address, 'house_no' => '',
        ];
        $matches        = [];
        if(preg_match('_^(\d.*?)\s(.+)_', $street_address, $matches) === 1)
        {
            $splitStreet['street']   = $matches[2];
            $splitStreet['house_no'] = $matches[1];
        }
        else if(preg_match('_(.+?)\s?(\d.*)_', $street_address, $matches) === 1)
        {
            $splitStreet['street']   = $matches[1];
            $splitStreet['house_no'] = $matches[2];
        }
        
        return $splitStreet;
    }
}
API documentation generated by ApiGen