1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
simpleproductextra.php
См. документацию.
1<?php
2
3namespace Sale\Handlers\DiscountPreset;
4
5use Bitrix\Main\Error;
6use Bitrix\Main\Localization\Loc;
7
8class SimpleProductExtra extends SimpleProduct
9{
10 public function getTitle()
11 {
12 return Loc::getMessage('SALE_HANDLERS_DISCOUNTPRESET_SIMPLEPRODUCT_EXTRA_NAME');
13 }
14
15 protected function getLabelDiscountValue()
16 {
17 return Loc::getMessage('SALE_HANDLERS_DISCOUNTPRESET_SIMPLEPRODUCT_EXTRA_LABEL_DISCOUNT_VALUE');
18 }
19
20 protected function getTypeOfDiscount()
21 {
22 return static::ACTION_TYPE_EXTRA;
23 }
24
25 public function getSort()
26 {
27 return 300;
28 }
29
30 protected function addErrorEmptyActionValue(): void
31 {
32 $this->errorCollection[] = new Error(Loc::getMessage('SALE_HANDLERS_DISCOUNTPRESET_ERROR_EMPTY_EXTRA_VALUE'));
33 }
34}
trait Error
Определения error.php:11