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.

CatalogPriceRule domain

CatalogPriceRule Commands

AddCatalogPriceRuleCommand

PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\Command\AddCatalogPriceRuleCommand Adds new catalog price rule with provided data

Command details
Constructor parameters
  • $string $name
  • $int $currencyId
  • $int $countryId
  • $int $groupId
  • $int $fromQuantity
  • $string $reductionType
  • $float $reductionValue
  • $int $shopId
  • $bool $includeTax
  • $float $price
Handler class PrestaShop\PrestaShop\Adapter\CatalogPriceRule\CommandHandler\AddCatalogPriceRuleHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\CommandHandler\AddCatalogPriceRuleHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\ValueObject\CatalogPriceRuleId

BulkDeleteCatalogPriceRuleCommand

PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\Command\BulkDeleteCatalogPriceRuleCommand Deletes catalog price rules in bulk acton

Command details
Constructor parameters
  • $array $catalogPriceRuleIds
Handler class PrestaShop\PrestaShop\Adapter\CatalogPriceRule\CommandHandler\BulkDeleteCatalogPriceRuleHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\CommandHandler\BulkDeleteCatalogPriceRuleHandlerInterface
Return type void

DeleteCatalogPriceRuleCommand

PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\Command\DeleteCatalogPriceRuleCommand Deletes catalog price rule

Command details
Constructor parameters
  • $int $catalogPriceRuleId
Handler class PrestaShop\PrestaShop\Adapter\CatalogPriceRule\CommandHandler\DeleteCatalogPriceRuleHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\CommandHandler\DeleteCatalogPriceRuleHandlerInterface
Return type void

EditCatalogPriceRuleCommand

PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\Command\EditCatalogPriceRuleCommand Edits catalog price rule with given data

Command details
Constructor parameters
  • $int $catalogPriceRuleId
Handler class PrestaShop\PrestaShop\Adapter\CatalogPriceRule\CommandHandler\EditCatalogPriceRuleHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\CommandHandler\EditCatalogPriceRuleHandlerInterface
Return type void

CatalogPriceRule Queries

GetCatalogPriceRuleForEditing

PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\Query\GetCatalogPriceRuleForEditing Provides data transfer object for editing CatalogPriceRule

Query details
Constructor parameters
  • $int $catalogPriceRuleId
Handler class PrestaShop\PrestaShop\Adapter\CatalogPriceRule\QueryHandler\GetCatalogPriceRuleForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\QueryHandler\GetCatalogPriceRuleForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\QueryResult\EditableCatalogPriceRule