Warning: You are browsing the documentation for PrestaShop 8, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 9. Read the updated version of this page

Learn how to update to the latest version.

Country domain

Country Commands

AddCountryCommand

PrestaShop\PrestaShop\Core\Domain\Country\Command\AddCountryCommand Adds new zone with provided data.

Command details
Constructor parameters
  • $array $localizedNames
  • $string $isoCode
  • $int $callPrefix
  • $int $defaultCurrency
  • $int $zoneId
  • $bool $needZipCode
  • $string $zipCodeFormat
  • $string $addressFormat
  • $bool $enabled
  • $bool $containsStates
  • $bool $needIdNumber
  • $bool $displayTaxLabel
  • $array $shopAssociation
Handler class PrestaShop\PrestaShop\Adapter\Country\CommandHandler\AddCountryHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Country\CommandHandler\AddCountryHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Country\ValueObject\CountryId

Country Queries

GetCountryRequiredFields

PrestaShop\PrestaShop\Core\Domain\Country\Query\GetCountryRequiredFields Query for getting country required fields

Query details
Constructor parameters
  • $int $countryId
Handler class PrestaShop\PrestaShop\Adapter\Country\QueryHandler\GetCountryRequiredFieldsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Country\QueryHandler\GetCountryRequiredFieldsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Country\QueryResult\CountryRequiredFields