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

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
  • $string $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

GetCatalogPriceRuleListForProduct

PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\Query\GetCatalogPriceRuleListForProduct __

Query details
Constructor parameters
  • $int $productId
  • $int $langId
  • $?int $limit = NULL
  • $?int $offset = NULL
Handler class PrestaShop\PrestaShop\Adapter\CatalogPriceRule\QueryHandler\GetCatalogPriceRuleListForProductHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\QueryHandler\GetCatalogPriceRuleListForProductHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\CatalogPriceRule\QueryResult\CatalogPriceRuleList