Table of Contents

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

Product domain

Product Commands

RemoveAllAssociatedProductAttachmentsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Attachment\Command\RemoveAllAssociatedProductAttachmentsCommand Removes all product-attachment associations for provided product

Command details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\Attachment\CommandHandler\RemoveAllAssociatedProductAttachmentsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Attachment\CommandHandler\RemoveAllAssociatedProductAttachmentsHandlerInterface
Return type void

SetAssociatedProductAttachmentsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Attachment\Command\SetAssociatedProductAttachmentsCommand Replaces previous product attachments association with the provided one.

Command details
Constructor parameters
  • $int $productId
  • $array $attachmentIds
Handler class PrestaShop\PrestaShop\Adapter\Product\Attachment\CommandHandler\SetAssociatedProductAttachmentsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Attachment\CommandHandler\SetAssociatedProductAttachmentsHandlerInterface
Return type void

BulkDeleteCombinationCommand

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\BulkDeleteCombinationCommand Deletes multiple combinations

Command details
Constructor parameters
  • $int $productId
  • $array $combinationIds
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\BulkDeleteCombinationHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\BulkDeleteCombinationHandlerInterface
Return type void

DeleteCombinationCommand

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\DeleteCombinationCommand __

Command details
Constructor parameters
  • $int $combinationId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\DeleteCombinationHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\DeleteCombinationHandlerInterface
Return type void

GenerateProductCombinationsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\GenerateProductCombinationsCommand Generates attribute combinations for product

Command details
Constructor parameters
  • $int $productId
  • $array $groupedAttributeIds
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\GenerateProductCombinationsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\GenerateProductCombinationsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Combination\ValueObject\CombinationId[]

RemoveAllCombinationImagesCommand

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\RemoveAllCombinationImagesCommand __

Command details
Constructor parameters
  • $int $combinationId
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\RemoveAllCombinationImagesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\RemoveAllCombinationImagesHandlerInterface
Return type void

SetCombinationImagesCommand

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\SetCombinationImagesCommand __

Command details
Constructor parameters
  • $int $combinationId
  • $array $imageIds
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\SetCombinationImagesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\SetCombinationImagesHandlerInterface
Return type void

UpdateCombinationCommand

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\UpdateCombinationCommand Contains all the data needed to handle the command update. This command is only designed for the general data of combination which can be persisted in one call. It was not designed to handle the combination relations.

Command details
Constructor parameters
  • $int $combinationId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\UpdateCombinationHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\UpdateCombinationHandlerInterface
Return type void

UpdateCombinationStockAvailableCommand

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\UpdateCombinationStockAvailableCommand __

Command details
Constructor parameters
  • $int $combinationId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\UpdateCombinationStockAvailableHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\UpdateCombinationStockAvailableHandlerInterface
Return type void

UpdateCombinationSuppliersCommand

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\UpdateCombinationSuppliersCommand Associates supplier with product combination

Command details
Constructor parameters
  • $int $combinationId
  • $array $combinationSuppliers
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\UpdateCombinationSuppliersHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\UpdateCombinationSuppliersHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Supplier\ValueObject\ProductSupplierAssociation[]

AddProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\AddProductCommand Command for creating product with basic information

Command details
Constructor parameters
  • $string $productType
  • $int $shopId
  • `$array $localizedNames = array (
)`
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\AddProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\AddProductHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\ValueObject\ProductId

AssignProductToCategoryCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\AssignProductToCategoryCommand Class AssignProductToCategoryCommand adds a product to a category.

Command details
Constructor parameters
  • $int $categoryId
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\AssignProductToCategoryHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\AssignProductToCategoryHandlerInterface
Return type void

BulkDeleteProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\BulkDeleteProductCommand Deletes multiple products

Command details
Constructor parameters
  • $array $productIds
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\BulkDeleteProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\BulkDeleteProductHandlerInterface
Return type void

BulkDuplicateProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\BulkDuplicateProductCommand Deletes multiple products

Command details
Constructor parameters
  • $array $productIds
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\BulkDuplicateProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\BulkDuplicateProductHandlerInterface
Return type array<ProductId>

BulkUpdateProductStatusCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\BulkUpdateProductStatusCommand Deletes multiple products

Command details
Constructor parameters
  • $array $productIds
  • $bool $newStatus
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\BulkUpdateProductStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\BulkUpdateProductStatusHandlerInterface
Return type void

DeleteProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\DeleteProductCommand Deletes product

Command details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\DeleteProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\DeleteProductHandlerInterface
Return type void

DuplicateProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\DuplicateProductCommand Duplicates product

Command details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\DuplicateProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\DuplicateProductHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\ValueObject\ProductId

RemoveAllAssociatedProductCategoriesCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\RemoveAllAssociatedProductCategoriesCommand Removes all product-category associations

Command details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\RemoveAllAssociatedProductCategoriesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\RemoveAllAssociatedProductCategoriesHandlerInterface
Return type void

RemoveAllProductTagsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\RemoveAllProductTagsCommand Removes all Tags for product

Command details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\RemoveAllProductTagsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\RemoveAllProductTagsHandlerInterface
Return type void

RemoveAllRelatedProductsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\RemoveAllRelatedProductsCommand Removes all related products from given product

Command details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\RemoveAllRelatedProductsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\RemoveAllRelatedProductsHandlerInterface
Return type void

SetAssociatedProductCategoriesCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\SetAssociatedProductCategoriesCommand Sets new product-category associations

Command details
Constructor parameters
  • $int $productId
  • $int $defaultCategoryId
  • $array $categoryIds
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\SetAssociatedProductCategoriesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\SetAssociatedProductCategoriesHandlerInterface
Return type void

SetCarriersCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\SetCarriersCommand Set the list of carriers for a product

Command details
Constructor parameters
  • $int $productId
  • $array $carrierReferenceIds
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\SetCarriersHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\SetCarriersHandlerInterface
Return type void

SetProductTagsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\SetProductTagsCommand Updates product tags in provided languages

Command details
Constructor parameters
  • $int $productId
  • $array $localizedTags
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\SetProductTagsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\UpdateProductTagsHandlerInterface
Return type void

SetRelatedProductsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\SetRelatedProductsCommand Sets related products for product

Command details
Constructor parameters
  • $int $productId
  • $array $relatedProductIds
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\SetRelatedProductsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\SetRelatedProductsHandlerInterface
Return type void

UpdateProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\UpdateProductCommand Contains all the data needed to handle the product update. This command is only designed for the general data of product which can be persisted in one call. It was not designed to handle the product relations.

Command details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\UpdateProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\UpdateProductHandlerInterface
Return type void

UpdateProductStatusCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\UpdateProductStatusCommand Class UpdateProductStatusCommand update a given product status

Command details
Constructor parameters
  • $int $productId
  • $bool $enable
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\UpdateProductStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\UpdateProductStatusHandlerInterface
Return type void

UpdateProductTypeCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\UpdateProductTypeCommand __

Command details
Constructor parameters
  • $int $productId
  • $string $productType
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\UpdateProductTypeHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\UpdateProductTypeHandlerInterface
Return type void

UpdateProductsPositionsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Command\UpdateProductsPositionsCommand Updates product details

Command details
Constructor parameters
  • $array $positions
  • $int $categoryId
Handler class PrestaShop\PrestaShop\Adapter\Product\CommandHandler\UpdateProductsPositionsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\CommandHandler\UpdateProductsPositionsHandlerInterface
Return type void

RemoveAllCustomizationFieldsFromProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\Customization\Command\RemoveAllCustomizationFieldsFromProductCommand Removes all customization fields from product

Command details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\Customization\CommandHandler\RemoveAllCustomizationFieldsFromProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Customization\CommandHandler\RemoveAllCustomizationFieldsFromProductHandlerInterface
Return type void

SetProductCustomizationFieldsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Customization\Command\SetProductCustomizationFieldsCommand Sets product customization fields

Command details
Constructor parameters
  • $int $productId
  • $array $customizationFields
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Customization\CommandHandler\SetProductCustomizationFieldsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Customization\CommandHandler\SetProductCustomizationFieldsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Customization\ValueObject\CustomizationFieldId[]

RemoveAllFeatureValuesFromProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\FeatureValue\Command\RemoveAllFeatureValuesFromProductCommand Removes all product feature values

Command details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\FeatureValue\CommandHandler\RemoveAllFeatureValuesFromProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\FeatureValue\CommandHandler\RemoveAllFeatureValuesFromProductHandlerInterface
Return type void

SetProductFeatureValuesCommand

PrestaShop\PrestaShop\Core\Domain\Product\FeatureValue\Command\SetProductFeatureValuesCommand Sets product feature values

Command details
Constructor parameters
  • $int $productId
  • $array $featureValues
Handler class PrestaShop\PrestaShop\Adapter\Product\FeatureValue\CommandHandler\SetProductFeatureValuesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\FeatureValue\CommandHandler\SetProductFeatureValuesHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Feature\ValueObject\FeatureValueId[]

AddProductImageCommand

PrestaShop\PrestaShop\Core\Domain\Product\Image\Command\AddProductImageCommand Adds new product image

Command details
Constructor parameters
  • $int $productId
  • $string $pathName
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Image\CommandHandler\AddProductImageHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Image\CommandHandler\AddProductImageHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Image\ValueObject\ImageId

DeleteProductImageCommand

PrestaShop\PrestaShop\Core\Domain\Product\Image\Command\DeleteProductImageCommand Deletes product image

Command details
Constructor parameters
  • $int $imageId
Handler class PrestaShop\PrestaShop\Adapter\Product\Image\CommandHandler\DeleteProductImageHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Image\CommandHandler\DeleteProductImageHandlerInterface
Return type void

SetProductImagesForAllShopCommand

PrestaShop\PrestaShop\Core\Domain\Product\Image\Command\SetProductImagesForAllShopCommand __

Command details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\Image\CommandHandler\SetProductImagesForAllShopHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Image\CommandHandler\SetProductImagesForAllShopHandlerInterface
Return type void

UpdateProductImageCommand

PrestaShop\PrestaShop\Core\Domain\Product\Image\Command\UpdateProductImageCommand __

Command details
Constructor parameters
  • $int $imageId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Image\CommandHandler\UpdateProductImageHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Image\CommandHandler\UpdateProductImageHandlerInterface
Return type void

RemoveAllProductsFromPackCommand

PrestaShop\PrestaShop\Core\Domain\Product\Pack\Command\RemoveAllProductsFromPackCommand Removes all products from provided pack

Command details
Constructor parameters
  • $int $packId
Handler class PrestaShop\PrestaShop\Adapter\Product\Pack\CommandHandler\RemoveAllProductsFromPackHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Pack\CommandHandler\RemoveAllProductsFromPackHandlerInterface
Return type void

SetPackProductsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Pack\Command\SetPackProductsCommand Sets products of product pack

Command details
Constructor parameters
  • $int $packId
  • $array $products
Handler class PrestaShop\PrestaShop\Adapter\Product\Pack\CommandHandler\SetPackProductsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Pack\CommandHandler\SetPackProductsHandlerInterface
Return type void

SetProductShopsCommand

PrestaShop\PrestaShop\Core\Domain\Product\Shop\Command\SetProductShopsCommand __

Command details
Constructor parameters
  • $int $productId
  • $int $sourceShopId
  • $array $shopIds
Handler class PrestaShop\PrestaShop\Adapter\Product\Shop\CommandHandler\SetProductShopsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Shop\CommandHandler\SetProductShopsHandlerInterface
Return type void

AddSpecificPriceCommand

PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\Command\AddSpecificPriceCommand Add specific price to a Product

Command details
Constructor parameters
  • $int $productId
  • $string $reductionType
  • $string $reductionValue
  • $bool $includeTax
  • $string $fixedPrice
  • $int $fromQuantity
  • $DateTimeInterface $dateTimeFrom
  • $DateTimeInterface $dateTimeTo
Handler class PrestaShop\PrestaShop\Adapter\Product\SpecificPrice\CommandHandler\AddSpecificPriceHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\CommandHandler\AddSpecificPriceHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\ValueObject\SpecificPriceId

DeleteSpecificPriceCommand

PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\Command\DeleteSpecificPriceCommand Delete specific price to a Product

Command details
Constructor parameters
  • $int $specificPriceId
Handler class PrestaShop\PrestaShop\Adapter\Product\SpecificPrice\CommandHandler\DeleteSpecificPriceHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\CommandHandler\DeleteSpecificPriceHandlerInterface
Return type void

EditSpecificPriceCommand

PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\Command\EditSpecificPriceCommand __

Command details
Constructor parameters
  • $int $specificPriceId
Handler class PrestaShop\PrestaShop\Adapter\Product\SpecificPrice\CommandHandler\EditSpecificPriceHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\CommandHandler\EditSpecificPriceHandlerInterface
Return type void

RemoveSpecificPricePriorityForProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\Command\RemoveSpecificPricePriorityForProductCommand __

Command details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\SpecificPrice\CommandHandler\RemoveSpecificPricePriorityForProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\CommandHandler\RemoveSpecificPricePriorityForProductHandlerInterface
Return type void

SetSpecificPricePriorityForProductCommand

PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\Command\SetSpecificPricePriorityForProductCommand Sets specific price priority for provided product

Command details
Constructor parameters
  • $int $productId
  • $array $priorities
Handler class PrestaShop\PrestaShop\Adapter\Product\SpecificPrice\CommandHandler\SetSpecificPricePriorityForProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\CommandHandler\SetSpecificPricePriorityForProductHandlerInterface
Return type void

UpdateProductStockAvailableCommand

PrestaShop\PrestaShop\Core\Domain\Product\Stock\Command\UpdateProductStockAvailableCommand Updates product stock properties which are in a dedicated StockAvailable entity

Command details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Stock\CommandHandler\UpdateProductStockAvailableHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Stock\CommandHandler\UpdateProductStockHandlerInterface
Return type void

RemoveAllAssociatedProductSuppliersCommand

PrestaShop\PrestaShop\Core\Domain\Product\Supplier\Command\RemoveAllAssociatedProductSuppliersCommand Removes all product suppliers for specified product without combinations

Command details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\Supplier\CommandHandler\RemoveAllAssociatedProductSuppliersHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Supplier\CommandHandler\RemoveAllAssociatedProductSuppliersHandlerInterface
Return type void

SetProductDefaultSupplierCommand

PrestaShop\PrestaShop\Core\Domain\Product\Supplier\Command\SetProductDefaultSupplierCommand __

Command details
Constructor parameters
  • $int $productId
  • $int $defaultSupplierId
Handler class PrestaShop\PrestaShop\Adapter\Product\Supplier\CommandHandler\SetProductDefaultSupplierHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Supplier\CommandHandler\SetProductDefaultSupplierHandlerInterface
Return type void

SetSuppliersCommand

PrestaShop\PrestaShop\Core\Domain\Product\Supplier\Command\SetSuppliersCommand This command is used to set (or assign) suppliers to a product It is used for both product with or without combinations and only defines the association not the content themselves. To update contents you need to use UpdateProductSuppliersCommand or UpdateCombinationSuppliersCommand one you have correctly set the associations with this command. When no default supplier was associated this command will automatically use the first provided one, however to change it to your need you can use SetProductDefaultSupplierCommand.

Command details
Constructor parameters
  • $int $productId
  • $array $supplierIds
Handler class PrestaShop\PrestaShop\Adapter\Product\Supplier\CommandHandler\SetSuppliersHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Supplier\CommandHandler\SetSuppliersHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Supplier\ValueObject\ProductSupplierAssociation[]

UpdateProductSuppliersCommand

PrestaShop\PrestaShop\Core\Domain\Product\Supplier\Command\UpdateProductSuppliersCommand Updates product suppliers

Command details
Constructor parameters
  • $int $productId
  • $array $productSuppliers
Handler class PrestaShop\PrestaShop\Adapter\Product\Supplier\CommandHandler\UpdateProductSuppliersHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Supplier\CommandHandler\UpdateProductSuppliersHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Supplier\ValueObject\ProductSupplierAssociation[]

AddVirtualProductFileCommand

PrestaShop\PrestaShop\Core\Domain\Product\VirtualProductFile\Command\AddVirtualProductFileCommand Adds downloadable file for virtual product

Command details
Constructor parameters
  • $int $productId
  • $string $filePath
  • $string $displayName
  • $?int $accessDays = NULL
  • $?int $downloadTimesLimit = NULL
  • $?DateTimeInterface $expirationDate = NULL
Handler class PrestaShop\PrestaShop\Adapter\Product\VirtualProduct\CommandHandler\AddVirtualProductFileHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\VirtualProductFile\CommandHandler\AddVirtualProductFileHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\VirtualProductFile\ValueObject\VirtualProductFileId

DeleteVirtualProductFileCommand

PrestaShop\PrestaShop\Core\Domain\Product\VirtualProductFile\Command\DeleteVirtualProductFileCommand __

Command details
Constructor parameters
  • $int $virtualProductFileId
Handler class PrestaShop\PrestaShop\Adapter\Product\VirtualProduct\CommandHandler\DeleteVirtualProductFileHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\VirtualProductFile\CommandHandler\DeleteVirtualProductFileHandlerInterface
Return type void

UpdateVirtualProductFileCommand

PrestaShop\PrestaShop\Core\Domain\Product\VirtualProductFile\Command\UpdateVirtualProductFileCommand __

Command details
Constructor parameters
  • $int $virtualProductFileId
Handler class PrestaShop\PrestaShop\Adapter\Product\VirtualProduct\CommandHandler\UpdateVirtualProductFileHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\VirtualProductFile\CommandHandler\UpdateVirtualProductFileHandlerInterface
Return type void

Product Queries

GetProductAttributeGroups

PrestaShop\PrestaShop\Core\Domain\Product\AttributeGroup\Query\GetProductAttributeGroups Query which provides attributes of a Product by group

Query details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\AttributeGroup\QueryHandler\GetProductAttributeGroupsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\AttributeGroup\QueryHandler\GetProductAttributeGroupsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\AttributeGroup\QueryResult\AttributeGroup[]

GetCombinationForEditing

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\GetCombinationForEditing Query which provides combination for editing

Query details
Constructor parameters
  • $int $combinationId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\QueryHandler\GetCombinationForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\GetCombinationForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryResult\CombinationForEditing

GetCombinationSuppliers

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\GetCombinationSuppliers Retrieves data for product combination supplier

Query details
Constructor parameters
  • $int $combinationId
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\QueryHandler\GetCombinationSuppliersHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\GetCombinationSuppliersHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Supplier\QueryResult\ProductSupplierForEditing[]

GetEditableCombinationsList

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\GetEditableCombinationsList Retrieves product combinations

Query details
Constructor parameters
  • $int $productId
  • $int $languageId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
  • $?int $limit = NULL
  • $?int $offset = NULL
  • $?string $orderBy = NULL
  • $?string $orderWay = NULL
  • `$array $filters = array (
)`
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\QueryHandler\GetEditableCombinationsListHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\GetEditableCombinationsListHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryResult\CombinationListForEditing

SearchCombinationsForAssociation

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\SearchCombinationsForAssociation __

Query details
Constructor parameters
  • $string $phrase
  • $int $languageId
  • $int $shopId
  • `$array $filters = array (
)</li> <li>$?int $limit = NULL`
Handler class PrestaShop\PrestaShop\Adapter\Product\Combination\QueryHandler\SearchCombinationsForAssociationHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\SearchCombinationsForAssociationHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryResult\CombinationForAssociation[]

GetProductCustomizationFields

PrestaShop\PrestaShop\Core\Domain\Product\Customization\Query\GetProductCustomizationFields Gets product customization fields

Query details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Customization\QueryHandler\GetProductCustomizationFieldsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Customization\QueryHandler\GetProductCustomizationFieldsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Customization\QueryResult\CustomizationField[]

GetProductFeatureValues

PrestaShop\PrestaShop\Core\Domain\Product\FeatureValue\Query\GetProductFeatureValues Get FeatureValue associated to a Product

Query details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\FeatureValue\QueryHandler\GetProductFeatureValuesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\FeatureValue\QueryHandler\GetProductFeatureValuesHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\FeatureValue\QueryResult\ProductFeatureValue[]

GetProductImage

PrestaShop\PrestaShop\Core\Domain\Product\Image\Query\GetProductImage __

Query details
Constructor parameters
  • $int $imageId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Image\QueryHandler\GetProductImageHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Image\QueryHandler\GetProductImageHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Image\QueryResult\ProductImage

GetProductImages

PrestaShop\PrestaShop\Core\Domain\Product\Image\Query\GetProductImages Get list of Images associated to a Product in terms of ShopConstraint

Query details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Image\QueryHandler\GetProductImagesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Image\QueryHandler\GetProductImagesHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Image\QueryResult\ProductImage[]

GetShopProductImages

PrestaShop\PrestaShop\Core\Domain\Product\Image\Query\GetShopProductImages Get list of Images associated to a Product detailed for every shop

Query details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\Image\QueryHandler\GetShopProductImagesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Image\QueryHandler\GetShopProductImagesHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Image\QueryResult\Shop\ShopProductImagesCollection

GetPackedProducts

PrestaShop\PrestaShop\Core\Domain\Product\Pack\Query\GetPackedProducts Retrieves product from a pack

Query details
Constructor parameters
  • $int $packId
  • $int $languageId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
Handler class PrestaShop\PrestaShop\Adapter\Product\Pack\QueryHandler\GetPackedProductsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Pack\QueryHandler\GetPackedProductsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Pack\QueryResult\PackedProductDetails[]

GetProductForEditing

PrestaShop\PrestaShop\Core\Domain\Product\Query\GetProductForEditing Get Product data necessary for editing

Query details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
  • $int $displayLanguageId
Handler class PrestaShop\PrestaShop\Adapter\Product\QueryHandler\GetProductForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\QueryHandler\GetProductForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\QueryResult\ProductForEditing

GetProductIsEnabled

PrestaShop\PrestaShop\Core\Domain\Product\Query\GetProductIsEnabled Get current status (enabled/disabled) for a given product

Query details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\QueryHandler\GetProductIsEnabledHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\QueryHandler\GetProductIsEnabledHandlerInterface
Return type bool

GetProductSupplierOptions

PrestaShop\PrestaShop\Core\Domain\Product\Supplier\Query\GetProductSupplierOptions Provides product supplier options

Query details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\QueryHandler\GetProductSupplierOptionsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Supplier\QueryHandler\GetProductSupplierOptionsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Supplier\QueryResult\ProductSupplierOptions

GetRelatedProducts

PrestaShop\PrestaShop\Core\Domain\Product\Query\GetRelatedProducts Provides related products for given product

Query details
Constructor parameters
  • $int $productId
  • $int $languageId
Handler class PrestaShop\PrestaShop\Adapter\Product\QueryHandler\GetRelatedProductsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\QueryHandler\GetRelatedProductsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\QueryResult\RelatedProduct[]

SearchProductsForAssociation

PrestaShop\PrestaShop\Core\Domain\Product\Query\SearchProductsForAssociation __

Query details
Constructor parameters
  • $string $phrase
  • $int $languageId
  • $int $shopId
  • $?int $limit = NULL
Handler class PrestaShop\PrestaShop\Adapter\Product\QueryHandler\SearchProductsForAssociationHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\QueryHandler\SearchProductsForAssociationHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\QueryResult\ProductForAssociation[]

SearchProducts

PrestaShop\PrestaShop\Core\Domain\Product\Query\SearchProducts Queries for products by provided search phrase

Query details
Constructor parameters
  • $string $phrase
  • $int $resultsLimit
  • $string $isoCode
  • $?int $orderId = NULL
Handler class PrestaShop\PrestaShop\Adapter\Product\QueryHandler\SearchProductsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\QueryHandler\SearchProductsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\QueryResult\FoundProduct[]

GetSpecificPriceForEditing

PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\Query\GetSpecificPriceForEditing Query which provides specific price for editing

Query details
Constructor parameters
  • $int $specificPriceId
Handler class PrestaShop\PrestaShop\Adapter\Product\SpecificPrice\QueryHandler\GetSpecificPriceForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\QueryHandler\GetSpecificPriceForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\QueryResult\SpecificPriceForEditing

GetSpecificPriceList

PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\Query\GetSpecificPriceList Retrieves product specific prices

Query details
Constructor parameters
  • $int $productId
  • $int $languageId
  • $?int $limit = NULL
  • $?int $offset = NULL
  • `$array $filters = array (
)`
Handler class PrestaShop\PrestaShop\Adapter\Product\SpecificPrice\QueryHandler\GetSpecificPriceListHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\QueryHandler\GetSpecificPriceListHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\SpecificPrice\QueryResult\SpecificPriceList

GetCombinationStockMovements

PrestaShop\PrestaShop\Core\Domain\Product\Stock\Query\GetCombinationStockMovements This query returns a list of stock movements for a combination, each row is either an edition from the BO by an employee or a range of customer orders resume (all the combinations that were sold between each edition).

Query details
Constructor parameters
  • $int $combinationId
  • $int $shopId
  • $int $offset = 0
  • $int $limit = 5
Handler class PrestaShop\PrestaShop\Adapter\Product\Stock\QueryHandler\GetCombinationStockMovementsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Stock\QueryHandler\GetCombinationStockMovementsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Stock\QueryResult\StockMovement[]

GetProductStockMovements

PrestaShop\PrestaShop\Core\Domain\Product\Stock\Query\GetProductStockMovements This query returns a list of stock movements for a product, each row is either an edition from the BO by an employee or a range of customer orders resume (all the products that were sold between each edition).

Query details
Constructor parameters
  • $int $productId
  • $int $shopId
  • $int $offset = 0
  • $int $limit = 5
Handler class PrestaShop\PrestaShop\Adapter\Product\Stock\QueryHandler\GetProductStockMovementsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Stock\QueryHandler\GetProductStockMovementsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Stock\QueryResult\StockMovement[]

GetAssociatedSuppliers

PrestaShop\PrestaShop\Core\Domain\Product\Supplier\Query\GetAssociatedSuppliers Provides the list of suppliers associated to a product, and its default supllier.

Query details
Constructor parameters
  • $int $productId
Handler class PrestaShop\PrestaShop\Adapter\Product\Supplier\QueryHandler\GetAssociatedSuppliersHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Supplier\QueryHandler\GetAssociatedSuppliersHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Supplier\QueryResult\AssociatedSuppliers

GetCombinationIds

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\GetCombinationIds __

Query details
Constructor parameters
  • $int $productId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
  • $?int $limit = NULL
  • $?int $offset = NULL
  • $?string $orderBy = NULL
  • $?string $orderWay = NULL
  • `$array $filters = array (
)`
Handler class PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\GetCombinationIdsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\GetCombinationIdsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Combination\ValueObject\CombinationId[]

SearchProductCombinations

PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\SearchProductCombinations __

Query details
Constructor parameters
  • $int $productId
  • $int $languageId
  • $PrestaShop\PrestaShop\Core\Domain\Shop\ValueObject\ShopConstraint $shopConstraint
  • $string $searchPhrase
  • $int $limit = 20
Handler class PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\SearchProductCombinationsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\SearchProductCombinationsHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryResult\ProductCombinationsCollection