PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 6, 2024
Let's talk code, commerce and open source.

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

You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page

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