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

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

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

Learn how to upgrade to the latest version.

Supplier domain

Supplier Commands

AddSupplierCommand

PrestaShop\PrestaShop\Core\Domain\Supplier\Command\AddSupplierCommand Creates new supplier with provided data

Command details
Constructor parameters
  • $string $name
  • $string $address
  • $string $city
  • $int $countryId
  • $bool $enabled
  • $array $localizedDescriptions
  • $array $localizedMetaTitles
  • $array $localizedMetaDescriptions
  • $array $localizedMetaKeywords
  • $array $shopAssociation
  • $?string $address2 = NULL
  • $?string $postCode = NULL
  • $?int $stateId = NULL
  • $?string $phone = NULL
  • $?string $mobilePhone = NULL
  • $?string $dni = NULL
Handler class PrestaShop\PrestaShop\Adapter\Supplier\CommandHandler\AddSupplierHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\CommandHandler\AddSupplierHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Supplier\ValueObject\SupplierId

BulkDeleteSupplierCommand

PrestaShop\PrestaShop\Core\Domain\Supplier\Command\BulkDeleteSupplierCommand Class BulkDeleteSupplierCommand is responsible for deleting multiple suppliers.

Command details
Constructor parameters
  • $array $supplierIds
Handler class PrestaShop\PrestaShop\Adapter\Supplier\CommandHandler\BulkDeleteSupplierHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\CommandHandler\BulkDeleteSupplierHandlerInterface
Return type void

BulkDisableSupplierCommand

PrestaShop\PrestaShop\Core\Domain\Supplier\Command\BulkDisableSupplierCommand Class BulkDisableSupplierCommand is responsible for disabling multiple suppliers.

Command details
Constructor parameters
  • $array $supplierIds
Handler class PrestaShop\PrestaShop\Adapter\Supplier\CommandHandler\BulkDisableSupplierHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\CommandHandler\BulkDisableSupplierHandlerInterface
Return type void

BulkEnableSupplierCommand

PrestaShop\PrestaShop\Core\Domain\Supplier\Command\BulkEnableSupplierCommand Class BulkEnableSupplierCommand is responsible for enabling multiple suppliers.

Command details
Constructor parameters
  • $array $supplierIds
Handler class PrestaShop\PrestaShop\Adapter\Supplier\CommandHandler\BulkEnableSupplierHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\CommandHandler\BulkEnableSupplierHandlerInterface
Return type void

DeleteSupplierCommand

PrestaShop\PrestaShop\Core\Domain\Supplier\Command\DeleteSupplierCommand Class DeleteSupplierCommand is responsible for deleting the supplier.

Command details
Constructor parameters
  • $int $supplierId
Handler class PrestaShop\PrestaShop\Adapter\Supplier\CommandHandler\DeleteSupplierHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\CommandHandler\DeleteSupplierHandlerInterface
Return type void

EditSupplierCommand

PrestaShop\PrestaShop\Core\Domain\Supplier\Command\EditSupplierCommand Edits supplier with provided data

Command details
Constructor parameters
  • $int $supplierId
Handler class PrestaShop\PrestaShop\Adapter\Supplier\CommandHandler\EditSupplierHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\CommandHandler\EditSupplierHandlerInterface
Return type void

ToggleSupplierStatusCommand

PrestaShop\PrestaShop\Core\Domain\Supplier\Command\ToggleSupplierStatusCommand Class ToggleSupplierStatusCommand is responsible for toggling supplier status.

Command details
Constructor parameters
  • $int $supplierId
Handler class PrestaShop\PrestaShop\Adapter\Supplier\CommandHandler\ToggleSupplierStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\CommandHandler\ToggleSupplierStatusHandlerInterface
Return type void

Supplier Queries

GetSupplierForEditing

PrestaShop\PrestaShop\Core\Domain\Supplier\Query\GetSupplierForEditing Gets supplier for editing in Back Office

Query details
Constructor parameters
  • $int $supplierId
Handler class PrestaShop\PrestaShop\Adapter\Supplier\QueryHandler\GetSupplierForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\QueryHandler\GetSupplierForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Supplier\QueryResult\EditableSupplier

GetSupplierForViewing

PrestaShop\PrestaShop\Core\Domain\Supplier\Query\GetSupplierForViewing Get supplier information for viewing

Query details
Constructor parameters
  • $int $supplierId
  • $int $languageId
Handler class PrestaShop\PrestaShop\Adapter\Supplier\QueryHandler\GetSupplierForViewingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Supplier\QueryHandler\GetSupplierForViewingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Supplier\QueryResult\ViewableSupplier