Notice: You are browsing the documentation for PrestaShop 8, which is currently in development.

You might want to read the documentation for the current version, PrestaShop 1.7.

Address domain

Address Commands

AddCustomerAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\AddCustomerAddressCommand Adds new customer address

Command details
Constructor parameters
  • $int $customerId
  • $string $addressAlias
  • $string $firstName
  • $string $lastName
  • $string $address
  • $string $city
  • $int $countryId
  • $string $postcode
  • $?string $dni = NULL
  • $?string $company = NULL
  • $?string $vat_number = NULL
  • $?string $address2 = NULL
  • $int $id_state = 0
  • $?string $phone = NULL
  • $?string $phone_mobile = NULL
  • $?string $other = NULL
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\AddCustomerAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\AddCustomerAddressHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Address\ValueObject\AddressId

AddManufacturerAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\AddManufacturerAddressCommand Adds new address

Command details
Constructor parameters
  • $string $lastName
  • $string $firstName
  • $string $address
  • `$int
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\AddManufacturerAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\AddManufacturerAddressHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Address\ValueObject\AddressId

BulkDeleteAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\BulkDeleteAddressCommand Deletes addresses in bulk action

Command details
Constructor parameters
  • $int[] $addressIds
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\BulkDeleteAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\BulkDeleteAddressHandlerInterface
Return type void

DeleteAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\DeleteAddressCommand Deletes Address

Command details
Constructor parameters
  • $int $addressId
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\DeleteAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\DeleteAddressHandlerInterface
Return type void

EditCartAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\EditCartAddressCommand Class EditCartAddressCommand used to edit a cart address and then update the related field so that it uses the new duplicated address.

Command details
Constructor parameters
  • $int $cartId
  • $string $addressType
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\EditCartAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\EditCartAddressHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Address\ValueObject\AddressId

EditCustomerAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\EditCustomerAddressCommand Command responsible for holding edits customer address data

Command details
Constructor parameters
  • $int $addressId
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\EditCustomerAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\EditCustomerAddressHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Address\ValueObject\AddressId

EditManufacturerAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\EditManufacturerAddressCommand Edits manufacturer address

Command details
Constructor parameters
  • $int $addressId
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\EditManufacturerAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\EditManufacturerAddressHandlerInterface
Return type void

EditOrderAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\EditOrderAddressCommand Class EditOrderAddressCommand used to edit an order address and then update the related field so that it uses the new duplicated address.

Command details
Constructor parameters
  • $int $orderId
  • $string $addressType
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\EditOrderAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\EditOrderAddressHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Address\ValueObject\AddressId

SetRequiredFieldsForAddressCommand

PrestaShop\PrestaShop\Core\Domain\Address\Command\SetRequiredFieldsForAddressCommand Sets required fields for new address when adding

Command details
Constructor parameters
  • $array $requiredFields
Handler class PrestaShop\PrestaShop\Adapter\Address\CommandHandler\SetRequiredFieldsForAddressHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\CommandHandler\SetRequiredFieldsForAddressHandlerInterface
Return type void

Address Queries

GetCustomerAddressForEditing

PrestaShop\PrestaShop\Core\Domain\Address\Query\GetCustomerAddressForEditing Gets customer address for editing

Query details
Constructor parameters
  • $int $addressId
Handler class PrestaShop\PrestaShop\Adapter\Address\QueryHandler\GetCustomerAddressForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\QueryHandler\GetCustomerAddressForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Address\QueryResult\EditableCustomerAddress

GetManufacturerAddressForEditing

PrestaShop\PrestaShop\Core\Domain\Address\Query\GetManufacturerAddressForEditing Gets manufacturer address for editing

Query details
Constructor parameters
  • $int $addressId
Handler class PrestaShop\PrestaShop\Adapter\Address\QueryHandler\GetManufacturerAddressForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Address\QueryHandler\GetManufacturerAddressForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Address\QueryResult\EditableManufacturerAddress

GetRequiredFieldsForAddress

PrestaShop\PrestaShop\Core\Domain\Address\Query\GetRequiredFieldsForAddress Gets fields that are required for address

Query details
Constructor parameters
    Handler class PrestaShop\PrestaShop\Adapter\Address\QueryHandler\GetRequiredFieldsForAddressHandler

    Implements:

    • PrestaShop\PrestaShop\Core\Domain\Address\QueryHandler\GetRequiredFieldsForAddressHandlerInterface
    Return type string[]