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
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractAddonValueServiceFactory
  • AbstractAddonValueStorage
  • AbstractApiV2Controller
  • AbstractCategoryServiceFactory
  • AbstractCollection
  • AbstractCreateAccountProcess
  • AbstractCustomerFactory
  • AbstractCustomerServiceFactory
  • AbstractFileStorage
  • AbstractHttpContextFactory
  • AbstractHttpViewControllerRegistryFactory
  • AbstractImagesApiV2Controller
  • AbstractInvoiceServiceFactory
  • AbstractJsonSerializer
  • AbstractModuleCenterModule
  • AbstractModuleCenterModuleController
  • AbstractOrderServiceFactory
  • AbstractProductAttributeServiceFactory
  • AbstractProductServiceFactory
  • AbstractSliderServiceFactory
  • AddonValueService
  • AddonValueServiceFactory
  • AddonValueStorageFactory
  • AddressBlock
  • AddressBookService
  • AddressClass
  • AddressesApiV2Controller
  • AddressFormatProvider
  • 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
  • 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
  • NewAttributesController
  • NewsletterLinkModuleCenterModule
  • NewsletterLinkModuleCenterModuleController
  • NonEmptyStringType
  • OldOrderOverviewModuleCenterModule
  • OldOrderOverviewModuleCenterModuleController
  • 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
  • OrderStatusHistoryListItem
  • OrderStatusHistoryListItemCollection
  • OrderStatusHistoryStorage
  • OrderStatusStyles
  • OrdersTotalsApiV2Controller
  • OrderTooltipController
  • OrderTotal
  • OrderTotalCollection
  • OrderTotalFactory
  • OrderTotalRepository
  • OrderTotalRepositoryDeleter
  • OrderTotalRepositoryReader
  • OrderTotalRepositoryWriter
  • OrderTrackingInformationCollection
  • OrderWriteService
  • PackedDownloadController
  • PasswordEncryptionSettings
  • PasswordHashStrategy
  • PathType
  • 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
  • RedirectHttpControllerResponse
  • SessionTimeoutAjaxController
  • SharedShoppingCartConfigurationController
  • SharedShoppingCartController
  • SharedShoppingCartDeleter
  • SharedShoppingCartModuleCenterModule
  • SharedShoppingCartModuleCenterModuleController
  • SharedShoppingCartReader
  • SharedShoppingCartRepository
  • SharedShoppingCartService
  • SharedShoppingCartSettings
  • SharedShoppingCartWriter
  • ShipcloudController
  • ShipcloudModuleCenterModule
  • ShipcloudModuleCenterModuleController
  • 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
  • TemplateConfigurationController
  • TrustedShopsModuleCenterModule
  • TrustedShopsModuleCenterModuleController
  • UnknownCustomerCountry
  • UploadedFile
  • UrlRewrite
  • UrlRewriteCollection
  • UrlRewriteStorage
  • UserConfigurationController
  • UserConfigurationReader
  • UserConfigurationService
  • UserConfigurationWriter
  • UsernamePasswordCredentials
  • VatNumberValidator
  • 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
  • OrderStatusHistoryReaderInterface
  • OrderStatusHistoryWriterInterface
  • 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
  • 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

Exceptions

  • AjaxException
  • AttachmentNotFoundException
  • FileNotFoundException
  • HttpApiV2Exception
  • InvalidCustomerDataException
  • MissingControllerNameException
  • 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 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 
<?php
/* --------------------------------------------------------------
   OrderListGenerator.inc.php 2017-03-03
   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]
   --------------------------------------------------------------
*/

require_once DIR_FS_CATALOG . '/inc/get_shipping_title.inc.php';
require_once DIR_FS_CATALOG . '/inc/get_payment_title.inc.php';

MainFactory::load_class('OrderListGeneratorInterface');

/**
 * Class OrderListGenerator
 *
 * @category System
 * @package  Order
 */
class OrderListGenerator implements OrderListGeneratorInterface
{
    /**
     * @var CI_DB_query_builder
     */
    protected $db;
    
    /**
     * @var int
     */
    protected $defaultLanguageId;
    
    
    /**
     * OrderListGenerator Constructor
     *
     * @param CI_DB_query_builder $db
     */
    public function __construct(CI_DB_query_builder $db)
    {
        $this->db = $db;
        
        $this->defaultLanguageId = $_SESSION['languages_id'];
    }
    
    
    /**
     * Get Order List Items
     *
     * Returns an order list item collection.
     *
     * @link http://www.codeigniter.com/user_guide/database/query_builder.html#looking-for-specific-data
     *
     * @param string|array $conditions Provide a WHERE clause string or an associative array (actually any parameter
     *                                 that is acceptable by the "where" method of the CI_DB_query_builder method).
     * @param IntType      $startIndex The start index of the wanted array to be returned (default = null).
     * @param IntType      $maxCount   Maximum amount of items which should be returned (default = null).
     * @param StringType   $orderBy    A string which defines how the items should be ordered (default = null).
     *
     * @return OrderListItemCollection
     *
     * @throws InvalidArgumentException If the result rows contain invalid values.
     */
    public function getOrderListByConditions($conditions = [],
                                             IntType $startIndex = null,
                                             IntType $maxCount = null,
                                             StringType $orderBy = null)
    {
        $this->_select()->_limit($startIndex, $maxCount)->_order($orderBy)->_group();
        
        $this->db->where('orders_status.language_id', $this->defaultLanguageId)
                 ->where('orders_total.class', 'ot_total');
        
        if(!empty($conditions))
        {
            $this->db->where($conditions);
        }
        
        $result = $this->db->get()->result_array();
        
        return $this->_prepareCollection($result);
    }
    
    
    /**
     * Filter order list items by the provided parameters.
     *
     * The following slug names need to be used:
     *
     *   - number => orders.orders_id
     *   - customer => orders.customers_lastname orders.customers_firstname
     *   - group => orders.customers_status_name
     *   - sum => orders_total.value
     *   - payment => orders.payment_method
     *   - shipping => orders.shipping_method
     *   - countryIsoCode => orders.delivery_country_iso_code_2
     *   - date => orders.date_purchased
     *   - status => orders_status.orders_status_name
     *   - totalWeight => orders.order_total_weight
     *
     * @param array           $filterParameters Contains the column slug-names and their values.
     * @param IntType|null    $startIndex       The start index of the wanted array to be returned (default = null).
     * @param IntType|null    $maxCount         Maximum amount of items which should be returned (default = null).
     * @param StringType|null $orderBy          A string which defines how the items should be ordered (default = null).
     *
     * @return OrderListItemCollection
     *
     * @throws BadMethodCallException
     * @throws InvalidArgumentException
     */
    public function filterOrderList(array $filterParameters,
                                    IntType $startIndex = null,
                                    IntType $maxCount = null,
                                    StringType $orderBy = null)
    {
        $result = $this->_filter($filterParameters, $startIndex, $maxCount, $orderBy);
        
        return $this->_prepareCollection($result->result_array());
    }
    
    
    /**
     * Get the filtered orders count.
     *
     * This number is useful for pagination functionality where the app needs to know the number of the filtered rows.
     *
     * @param array $filterParameters
     *
     * @return int
     *
     * @throws BadMethodCallException
     */
    public function filterOrderListCount(array $filterParameters)
    {
        $result = $this->_filter($filterParameters);
        
        return $result->num_rows();
    }
    
    
    /**
     * Filter records by a single keyword string.
     *
     * @param StringType      $keyword    Keyword string to be used for searching in order records.
     * @param IntType|null    $startIndex The start index of the wanted array to be returned (default = null).
     * @param IntType|null    $maxCount   Maximum amount of items which should be returned (default = null).
     * @param StringType|null $orderBy    A string which defines how the items should be ordered (default = null).
     *
     * @return mixed
     *
     * @throws InvalidArgumentException If the result rows contain invalid values.
     */
    public function getOrderListByKeyword(StringType $keyword,
                                          IntType $startIndex = null,
                                          IntType $maxCount = null,
                                          StringType $orderBy = null)
    {
        $this->_select()->_limit($startIndex, $maxCount)->_order($orderBy)->_group();
        
        $this->_setKeywordWhereClause($keyword);
        
        $result = $this->db->get()->result_array();
        
        return $this->_prepareCollection($result);
    }
    
    
    /**
     * Get count of orders filtered by keyword
     *
     * @param StringType $keyword Keyword string to be used for searching in order records.
     *
     * @return int
     */
    public function getOrderListByKeywordCount(StringType $keyword)
    {
        $this->_select()->_group();
        
        $this->_setKeywordWhereClause($keyword);
        
        $rows = $this->db->get()->num_rows();
        
        return $rows;
    }
    
    
    /**
     * Get the total count of all orders
     *
     * @return int
     */
    public function getOrderListCount()
    {
        $rows = $this->db->count_all('orders');
        
        return $rows;
    }
    
    
    /**
     * Execute the select and join methods.
     *
     * @return OrderListGenerator Returns the instance object for method chaining.
     *
     * @throws BadMethodCallException
     */
    protected function _select()
    {
        $columns = [
            $this->_ordersColumns(),
            $this->_ordersStatusColumns(),
            $this->_ordersTotalColumns(),
            $this->_addressColumns('delivery'),
            $this->_addressColumns('billing'),
            $this->_customersStatusColumns(),
            $this->_invoicesColumns()
        ];
        
        $this->db->select(implode(', ', $columns))
                 ->from('orders')
                 ->join('orders_status', 'orders_status.orders_status_id = orders.orders_status', 'inner')
                 ->join('orders_total', 'orders_total.orders_id = orders.orders_id', 'left')
                 ->join('customers', 'customers.customers_id = orders.customers_id', 'left')
                 ->join('customers_status', 'customers_status.customers_status_id = orders.customers_status', 'left')
                 ->join('invoices', 'orders.orders_id = invoices.order_id', 'left');
        
        return $this;
    }
    
    
    /**
     * @param StringType $keyword Keyword string to be used for searching in order records.
     */
    protected function _setKeywordWhereClause(StringType $keyword)
    {
        $match = $this->db->escape_like_str($keyword->asString());
        
        $this->db->where('
            orders_total.class = "ot_total" 
            AND orders_status.language_id = ' . $this->defaultLanguageId . ' 
            AND ( 
                orders.orders_id LIKE "%' . $match . '%"
                OR orders.customers_id LIKE "%' . $match . '%"
                OR orders.date_purchased LIKE "%' . $match . '%"
                OR orders.payment_class LIKE "%' . $match . '%"
                OR orders.payment_method LIKE "%' . $match . '%"
                OR orders.shipping_class LIKE "%' . $match . '%"
                OR orders.shipping_method LIKE "%' . $match . '%"
                OR orders.customers_firstname LIKE "%' . $match . '%"
                OR orders.customers_lastname LIKE "%' . $match . '%"
                OR orders_total.value LIKE "%' . $match . '%"
                OR orders_status.orders_status_id LIKE "%' . $match . '%"
                OR orders_status.orders_status_name LIKE "%' . $match . '%"
            )');
    }
    
    
    /**
     * Returns a string for the ::_select() method which contains column names of the orders table.
     *
     * @return string
     */
    protected function _ordersColumns()
    {
        return 'orders.orders_id, orders.customers_id, orders.date_purchased, orders.payment_class,
            orders.payment_method, orders.shipping_class, orders.shipping_method, orders.customers_name, 
            orders.customers_firstname, orders.customers_lastname, orders.comments, orders.customers_status,  
            orders.customers_status_name, orders.customers_email_address, orders.gm_send_order_status, 
            orders.order_total_weight, orders.customers_company';
    }
    
    
    /**
     * Returns a string for the ::_select() method which contains column names of the orders status table.
     *
     * @return string
     */
    protected function _ordersStatusColumns()
    {
        return 'orders_status.orders_status_id, orders_status.orders_status_name';
    }
    
    
    /**
     * Returns a string for the ::_select() method which contains column names of the orders total table.
     *
     * @return string
     */
    protected function _ordersTotalColumns()
    {
        return 'orders_total.value AS total_sum, orders_total.text AS total_sum_text';
    }
    
    
    /**
     * Returns a string for the ::_select() method which contains column names of the orders table for address data.
     *
     * @param string $type Whether delivery or billing.
     *
     * @return string
     *
     * @throws BadMethodCallException
     */
    protected function _addressColumns($type)
    {
        if($type !== 'delivery' && $type !== 'billing')
        {
            throw new BadMethodCallException('the "$type" argument has to be equal to whether "delivery" or "billing"');
        }
        
        return 'orders.' . $type . '_firstname, ' . 'orders.' . $type . '_lastname, ' . 'orders.' . $type . '_company, '
               . 'orders.' . $type . '_street_address, ' . 'orders.' . $type . '_house_number, ' . 'orders.' . $type
               . '_additional_info, ' . 'orders.' . $type . '_city, ' . 'orders.' . $type . '_postcode, ' . 'orders.'
               . $type . '_state, ' . 'orders.' . $type . '_country, ' . 'orders.' . $type . '_country_iso_code_2';
    }
    
    
    /**
     * Returns a string for the ::_select() method which contains fallback customer status name if no value is
     * set in the orders table.
     *
     * @return string
     */
    protected function _customersStatusColumns()
    {
        return 'customers_status.customers_status_name AS fallback_customers_status';
    }
    
    
    /**
     * Returns a string for the ::_select() method which contains fallback implosion of all invoice IDs of the order if
     * no value is set in the orders table.
     *
     * @return string
     */
    protected function _invoicesColumns()
    {
        return 'group_concat(DISTINCT invoice_number SEPARATOR ", ") AS invoice_numbers';
    }
    
    
    /**
     * Creates an order address block object by the given type and row_array (looped result of CIDB::result_array())
     *
     * @param string $type Whether delivery or billing.
     * @param array  $row  Array which contain data about an order result row.
     *
     * @return OrderAddressBlock
     *
     * @throws BadMethodCallException
     */
    protected function _createOrderAddressBlockByRow($type, array $row)
    {
        if($type !== 'delivery' && $type !== 'billing')
        {
            throw new BadMethodCallException('the "$type" argument has to be equal to whether "delivery" or "billing"');
        }
        
        $firstName             = MainFactory::create('StringType', (string)$row[$type . '_firstname']);
        $lastName              = MainFactory::create('StringType', (string)$row[$type . '_lastname']);
        $company               = MainFactory::create('StringType', (string)$row[$type . '_company']);
        $streetAddress         = MainFactory::create('StringType', (string)$row[$type . '_street_address']);
        $houseNumber           = MainFactory::create('StringType', (string)$row[$type . '_house_number']);
        $additionalAddressInfo = MainFactory::create('StringType', (string)$row[$type . '_additional_info']);
        $postCode              = MainFactory::create('StringType', (string)$row[$type . '_postcode']);
        $city                  = MainFactory::create('StringType', (string)$row[$type . '_city']);
        $state                 = MainFactory::create('StringType', (string)$row[$type . '_state']);
        $country               = MainFactory::create('StringType', (string)$row[$type . '_country']);
        $countryIsoCode        = MainFactory::create('StringType', (string)$row[$type . '_country_iso_code_2']);
        
        return MainFactory::create('OrderAddressBlock', $firstName, $lastName, $company, $streetAddress, $houseNumber,
                                   $additionalAddressInfo, $postCode, $city, $state, $country, $countryIsoCode);
    }
    
    
    /**
     * Add limit configuration to the database object.
     *
     * @param IntType $startIndex
     * @param IntType $maxCount
     *
     * @return OrderListGenerator Returns the instance object for method chaining.
     */
    protected function _limit(IntType $startIndex = null, IntType $maxCount = null)
    {
        if($maxCount && $startIndex)
        {
            $this->db->limit($maxCount->asInt(), $startIndex->asInt());
        }
        else
        {
            if($maxCount && !$startIndex)
            {
                $this->db->limit($maxCount->asInt());
            }
        }
        
        return $this;
    }
    
    
    /**
     * Set the order by clause of the query.
     *
     * @param StringType $orderBy
     *
     * @return OrderListGenerator Returns the instance object for method chaining.
     */
    protected function _order(StringType $orderBy = null)
    {
        if($orderBy)
        {
            $this->db->order_by($orderBy->asString());
        }
        
        return $this;
    }
    
    
    /**
     * Execute the group by statement.
     *
     * @return OrderListGenerator Returns the instance object for method chaining.
     */
    protected function _group()
    {
        $this->db->group_by('orders.orders_id, orders_status.orders_status_name, orders_total.value, orders_total.text');
        
        return $this;
    }
    
    
    /**
     * Prepare the OrderListItemCollection object.
     *
     * This method will prepare the collection object which is going to be returned by both
     * the "get" and "filter" methods. The following values are required to be present in
     * each row of the $result parameter:
     *
     *      - orders_id
     *      - customers_id
     *      - customers_firstname
     *      - customers_lastname
     *      - date_purchased
     *      - payment_class
     *      - payment_method
     *      - shipping_class
     *      - shipping_method
     *      - orders_status_id
     *      - orders_status_name
     *      - total_sum
     *
     * @param array $result Contains the order data.
     *
     * @return OrderListItemCollection
     *
     * @throws InvalidArgumentException
     */
    protected function _prepareCollection(array $result)
    {
        $listItems = [];
        
        foreach($result as $row)
        {
            $orderId           = new IdType((int)$row['orders_id']);
            $customerId        = new IdType((int)$row['customers_id']);
            $customerNameValue = empty($row['customers_firstname'])
                                 && empty($row['customers_lastname'])
                ? (string)$row['customers_name']
                : (string)$row['customers_firstname'] . ' ' . (string)$row['customers_lastname'];
            $customerName      = new StringType($customerNameValue);
            $customerEmail     = new StringType((string)$row['customers_email_address']);
            $totalSum          = new StringType((string)str_replace(['<b> ', '</b>'], '', $row['total_sum_text']));
            $customerCompany   = new StringType((string)$row['customers_company']);
            
            $purchaseDateTime = new EmptyDateTime($row['date_purchased']);
            $orderStatusId    = new IntType((int)$row['orders_status_id']);
            $orderStatusName  = new StringType((string)$row['orders_status_name']);
            
            $comment          = new StringType((string)$row['comments']);
            $customerStatusId = new IdType((int)$row['customers_status']);
            
            $customerStatusName = new StringType(!empty($row['customers_status_name'])
                                                     ? (string)$row['customers_status_name']
                                                     : (string)$row['fallback_customers_status']);
            $totalWeight        = new DecimalType($row['order_total_weight']
                                                      ? : 0.0000);
            $mailStatus         = new BoolType((int)$row['gm_send_order_status'] === 1);
            
            $orderListItem = MainFactory::create('OrderListItem');
            
            $orderListItem->setOrderId($orderId);
            $orderListItem->setCustomerId($customerId);
            $orderListItem->setCustomerName($customerName);
            $orderListItem->setCustomerEmail($customerEmail);
            $orderListItem->setCustomerCompany($customerCompany);
            
            $orderListItem->setDeliveryAddress($this->_createOrderAddressBlockByRow('delivery', $row));
            $orderListItem->setBillingAddress($this->_createOrderAddressBlockByRow('billing', $row));
            
            $orderListItem->setComment($comment);
            $orderListItem->setCustomerMemos($this->_createMemoCollectionByCustomersId($row['customers_id']));
            $orderListItem->setCustomerStatusId($customerStatusId);
            $orderListItem->setCustomerStatusName($customerStatusName);
            $orderListItem->setTotalWeight($totalWeight);
            $orderListItem->setTotalSum($totalSum);
            $orderListItem->setPaymentType($this->_createOrderPaymentType($row));
            $orderListItem->setShippingType($this->_createOrderShippingType($row));
            $orderListItem->setTrackingLinks($this->_createTrackingLinksByOrderId($row['orders_id']));
            $orderListItem->setPurchaseDateTime($purchaseDateTime);
            $orderListItem->setOrderStatusId($orderStatusId);
            $orderListItem->setOrderStatusName($orderStatusName);
            $orderListItem->setWithdrawalIds($this->_createWithdrawalIdsByOrderId($row['orders_id']));
            $orderListItem->setMailStatus($mailStatus);
            $orderListItem->setInvoiceNumbers($this->_createInvoiceNumberCollectionByOrderId($row['orders_id']));
            
            $listItems[] = $orderListItem;
        }
        
        $collection = MainFactory::create('OrderListItemCollection', $listItems);
        
        return $collection;
    }
    
    
    /**
     * Creates and returns an order payment type instance by the given row data.
     *
     * @param array $row Row array with data about the order payment type.
     *
     * @return OrderPaymentType
     */
    protected function _createOrderPaymentType(array $row)
    {
        return $this->_createOrderType('payment', $row);
    }
    
    
    /**
     * Creates and returns an order shipping type instance by the given row data.
     *
     * @param array $row Row array with data about the order shipping type.
     *
     * @return OrderShippingType
     */
    protected function _createOrderShippingType(array $row)
    {
        return $this->_createOrderType('shipping', $row);
    }
    
    
    /**
     * Creates and returns whether an order shipping or payment type instance by the given row data and type argument.
     *
     * @param string $type Whether 'shipping' or 'payment', used to determine the expected order type class.
     * @param array  $row  Row array with data about the order type.
     *
     * @return OrderShippingType|OrderPaymentType
     *
     * @throws InvalidArgumentException
     */
    protected function _createOrderType($type, array $row)
    {
        $explodedMethodName = explode('_', $row[$type . '_method']);
        
        $method = (count($explodedMethodName) === 2
                   && $explodedMethodName[0] === $explodedMethodName[1])
            ? $explodedMethodName[0]
            : $row[$type . '_method'];
        $title  = $method
            ? call_user_func('get_' . $type . '_title', $method)
            : '';
        
        $explodedClassName = explode('_', $row[$type . '_class']);
        
        $class = (count($explodedClassName) === 2
                  && $explodedClassName[0] === $explodedClassName[1])
            ? $explodedClassName[0]
            : $row[$type . '_class'];
        
        $configurationValue = $this->db->get_where('configuration', [
            'configuration_key' => 'MODULE_' . strtoupper($type) . '_' . strtoupper($class) . '_ALIAS'
        ])->row()->configuration_value;
        
        $alias = $configurationValue
            ? new StringType($configurationValue)
            : null;
        
        return MainFactory::create('Order' . ucfirst($type) . 'Type', new StringType($title),
                                   new StringType((string)$row[$type . '_class']), $alias);
    }
    
    
    /**
     * Creates and returns a customer memo collection by the given customers id.
     *
     * @param int $customersId Id of customer.
     *
     * @return CustomerMemoCollection
     */
    protected function _createMemoCollectionByCustomersId($customersId)
    {
        $memoArray = $this->db->get_where('customers_memo', ['customers_id' => $customersId])->result_array();
        $memos     = [];
        
        foreach($memoArray as $customerMemo)
        {
            $memoDate = new DateTime();
            $memoDate->setTimestamp(strtotime($customerMemo['memo_date']));
            
            $memos[] = MainFactory::create('CustomerMemo', MainFactory::create('IdType', $customerMemo['customers_id']),
                                           MainFactory::create('StringType', $customerMemo['memo_title']),
                                           MainFactory::create('StringType', $customerMemo['memo_text']), $memoDate,
                                           MainFactory::create('IdType', $customerMemo['poster_id']));
        }
        
        return MainFactory::create('CustomerMemoCollection', $memos);
    }
    
    
    /**
     * Creates and returns a string collection which contains the tracking links of the order.
     *
     * @param int $orderId Id of current order.
     *
     * @throws InvalidArgumentException
     *
     * @return StringCollection
     */
    protected function _createTrackingLinksByOrderId($orderId)
    {
        /* @var array $trackingLinksArray */
        $trackingLinksArray = $this->db->get_where('orders_parcel_tracking_codes', ['order_id' => $orderId])
                                       ->result_array();
        $links              = [];
        
        foreach($trackingLinksArray as $trackingLink)
        {
            $links[] = new StringType($trackingLink['url']);
        }
        
        return new StringCollection($links);
    }
    
    
    /**
     * Creates and returns a ID collection which contains the withdrawal ids of the order.
     *
     * @param int $orderId Id of current order.
     *
     * @throws InvalidArgumentException
     *
     * @return IdCollection
     */
    protected function _createWithdrawalIdsByOrderId($orderId)
    {
        /* @var array $withdrawalsArray */
        $withdrawalsArray = $this->db->get_where('withdrawals', ['order_id' => $orderId])->result_array();
        $withdrawalIds    = [];
        
        foreach($withdrawalsArray as $withdrawal)
        {
            $withdrawalIds[] = new IdType($withdrawal['withdrawal_id']);
        }
        
        return new IdCollection($withdrawalIds);
    }
    
    
    /**
     * Creates and returns a string collection which contains the invoice numbers of the order
     *
     * @param $orderId Id of current order
     *
     * @throws InvalidArgumentException
     *
     * @return StringCollection
     */
    protected function _createInvoiceNumberCollectionByOrderId($orderId)
    {
        /* @var array $invoiceNumberArray */
        $invoiceNumberArray = $this->db->select('invoice_number')
                                       ->distinct()
                                       ->from('invoices')
                                       ->where(['order_id' => $orderId])
                                       ->get()
                                       ->result_array();
        $invoiceNumbers     = [];
        
        foreach($invoiceNumberArray as $invoiceNumber)
        {
            $invoiceNumbers[] = new StringType($invoiceNumber['invoice_number']);
        }
        
        return new StringCollection($invoiceNumbers);
    }
    
    
    /**
     * Filter the order records.
     *
     * This method contains the filtering logic. It can be overloaded in order to provide a custom filtering logic.
     *
     * @param array           $filterParameters Contains the column slug-names and their values.
     * @param IntType|null    $startIndex       The start index of the wanted array to be returned (default = null).
     * @param IntType|null    $maxCount         Maximum amount of items which should be returned (default = null).
     * @param StringType|null $orderBy          A string which defines how the items should be ordered (default = null).
     *
     * @return CI_DB_result
     *
     * @throws BadMethodCallException
     */
    protected function _filter(array $filterParameters,
                               IntType $startIndex = null,
                               IntType $maxCount = null,
                               StringType $orderBy = null)
    {
        $this->_select()->_limit($startIndex, $maxCount)->_order($orderBy)->_group();
        
        $this->db->where('orders_status.language_id', $this->defaultLanguageId)
                 ->where('orders_total.class', 'ot_total')
                 ->where('customers_status.language_id', $this->defaultLanguageId);
        
        // Replace wildcards recursively
        array_walk($filterParameters, function (&$value, $key)
        {
            if(!is_array($value) && $value !== ''
               && !in_array($key, [
                    'date',
                    'group',
                    'paymentMethod',
                    'shippingMethod',
                    'countryIsoCode',
                    'status'
                ])
            )
            {
                $value = str_replace('*', '%', $this->db->escape_str($value));
            }
        });
        
        // Filter by order number. 
        if(is_array($filterParameters['number']))
        {
            $this->db->where('orders.orders_id >=', array_shift($filterParameters['number']));
            $this->db->where('orders.orders_id <=', array_shift($filterParameters['number']));
        }
        else if(!empty($filterParameters['number']) || $filterParameters['number'] === '0')
        {
            $this->db->where('`orders`.`orders_id` LIKE "' . $filterParameters['number'] . '"');
        }
        
        // Filter by customer. 
        if(!empty($filterParameters['customer']))
        {
            $this->db->group_start();
            if(strpos($filterParameters['customer'], '#') === 0)
            {
                $this->db->where('orders.customers_id', substr($filterParameters['customer'], 1));
            }
            else
            {
                $this->db->where('`orders`.`customers_name` LIKE "' . $filterParameters['customer'] . '"')
                         ->or_where('`customers`.`customers_firstname` LIKE "' . $filterParameters['customer'] . '"')
                         ->or_where('`customers`.`customers_lastname` LIKE "' . $filterParameters['customer'] . '"')
                         ->or_where('`customers`.`customers_id` LIKE "' . $filterParameters['customer'] . '"')
                         ->or_where('`customers`.`customers_cid` LIKE "' . $filterParameters['customer'] . '"')
                         ->or_where('`customers`.`customers_vat_id` LIKE "' . $filterParameters['customer'] . '"')
                         ->or_where('`customers`.`customers_gender` LIKE "' . $filterParameters['customer'] . '"')
                         ->or_where('`customers`.`customers_email_address` LIKE "' . $filterParameters['customer']
                                    . '"')
                         ->or_where('`customers`.`customers_telephone` LIKE "' . $filterParameters['customer'] . '"')
                         ->or_where('`customers`.`customers_fax` LIKE "' . $filterParameters['customer'] . '"');
            }
            $this->db->group_end();
        }
        
        // Filter by customer group.
        if(is_array($filterParameters['group']))
        {
            $groups = $filterParameters['group'];
            $this->db->group_start()->where('orders.customers_status', array_shift($groups));
            foreach($groups as $group)
            {
                $this->db->or_where('orders.customers_status', $group);
            }
            $this->db->group_end();
        }
        
        // Filter by total sum. 
        if(is_array($filterParameters['sum']))
        {
            $this->db->where('orders_total.value >=', $filterParameters['sum'][0]);
            $this->db->where('orders_total.value <=', $filterParameters['sum'][1]);
        }
        else
        {
            if(!empty($filterParameters['sum']))
            {
                $filterParameters['sum'] = str_replace(',', '.', $filterParameters['sum']);
                if(strpos($filterParameters['sum'], '%') !== false)
                {
                    $this->db->where('`orders_total`.`value` LIKE "' . $filterParameters['sum'] . '"');
                }
                else
                {
                    $this->db->where('orders_total.value', $filterParameters['sum']);
                }
            }
        }
        
        // Filter by payment. 
        if(is_array($filterParameters['paymentMethod']))
        {
            $paymentMethods = $filterParameters['paymentMethod'];
            $this->db->group_start()->where('orders.payment_class', array_shift($paymentMethods));
            foreach($paymentMethods as $payment)
            {
                $this->db->or_where('orders.payment_class', $payment);
            }
            $this->db->group_end();
        }
        
        // Filter by shipping method. 
        if(is_array($filterParameters['shippingMethod']))
        {
            $shippingMethods = $filterParameters['shippingMethod'];
            $this->db->group_start()->where('orders.shipping_class', array_shift($shippingMethods));
            foreach($shippingMethods as $shipping)
            {
                $this->db->or_where('orders.shipping_class', $shipping);
            }
            $this->db->group_end();
        }
        
        // Filter by country ISO code. 
        if(is_array($filterParameters['countryIsoCode']))
        {
            $countryIsoCodes = $filterParameters['countryIsoCode'];
            $this->db->group_start()->where('orders.delivery_country_iso_code_2', array_shift($countryIsoCodes));
            foreach($countryIsoCodes as $countryIsoCode)
            {
                $this->db->or_where('orders.delivery_country_iso_code_2', $countryIsoCode);
            }
            $this->db->group_end();
        }
        
        // Filter by purchase date. 
        $dateFormat = ($_SESSION['language_code'] === 'de')
            ? 'd.m.y'
            : 'm.d.y';
        if(is_array($filterParameters['date']))
        {
            $dateValue = DateTime::createFromFormat($dateFormat, array_shift($filterParameters['date']));
            $this->db->where('orders.date_purchased >=', $dateValue->format('Y-m-d'));
            $dateValue = DateTime::createFromFormat($dateFormat, array_shift($filterParameters['date']));
            $this->db->where('orders.date_purchased <=', $dateValue->format('Y-m-d') . '23:59:59');
        }
        else
        {
            if(!empty($filterParameters['date']))
            {
                $dateValue = DateTime::createFromFormat($dateFormat, $filterParameters['date']);
                $this->db->where('orders.date_purchased >=', $dateValue->format('Y-m-d'));
                $this->db->where('orders.date_purchased <=', $dateValue->format('Y-m-d') . ' 23:59:59');
            }
        }
        
        // Filter by order status. 
        if(is_array($filterParameters['status']))
        {
            $this->db->group_start()->where('orders.orders_status', array_shift($filterParameters['status']));
            foreach($filterParameters['status'] as $status)
            {
                $this->db->or_where('orders.orders_status', $status);
            }
            $this->db->group_end();
        }
        
        // Filter by total weight. 
        if(is_array($filterParameters['totalWeight']))
        {
            $this->db->where('orders.order_total_weight >=', array_shift($filterParameters['totalWeight']));
            $this->db->where('orders.order_total_weight <=', array_shift($filterParameters['totalWeight']));
        }
        else
        {
            if(!empty($filterParameters['totalWeight']))
            {
                $this->db->where('`orders`.`order_total_weight` LIKE "' . $filterParameters['totalWeight'] . '"');
            }
        }
        
        // Filter by invoice number.
        if(!empty($filterParameters['invoiceNumber']))
        {
            $this->db->where('`invoices`.`invoice_number` LIKE "' . $filterParameters['invoiceNumber'] . '"');
        }
        
        return $this->db->get();
    }
}
API documentation generated by ApiGen